3245 Georgi Kodinov 2011-07-05 [merge]
merged mysql-5.5->mysql-trunk
modified:
mysql-test/r/plugin_auth.result
mysql-test/suite/federated/federated.result
mysql-test/t/plugin_auth.test
sql/sql_acl.cc
3244 Magne Mahre 2011-07-05
Build failed after upgrade of GCC to 4.6.1
After upgrading to gcc 4.6.1, the build failed with:
error: cast to pointer from integer of different size
[-Werror=int-to-pointer-cast]
The change log for gcc (http://gcc.gnu.org/gcc-4.6/changes.html)
says:
"GCC now warns by default when casting integers to larger pointer
types. These warnings can be disabled with the option
-Wno-int-to-pointer-cast, which is now also available in C++"
The line has been removed as it is a remnant from old code, and
the result of the assignment is no longer used.
modified:
sql/opt_range.cc
=== modified file 'mysql-test/r/plugin_auth.result'
--- a/mysql-test/r/plugin_auth.result 2011-06-15 08:02:11 +0000
+++ b/mysql-test/r/plugin_auth.result 2011-07-05 16:06:34 +0000
@@ -456,4 +456,12 @@ ORDER BY COLUMN_NAME;
IS_NULLABLE COLUMN_NAME
YES authentication_string
YES plugin
+#
+# Bug # 11766641: 59792: BIN/MYSQL -UUNKNOWN -PUNKNOWN
+# .-> USING PASSWORD: NO
+#
+# shoud contain "using password=yes"
+ERROR 1045 (28000): Access denied for user 'unknown'@'localhost' (using password: YES)
+# shoud contain "using password=no"
+ERROR 1045 (28000): Access denied for user 'unknown'@'localhost' (using password: NO)
End of 5.5 tests
=== modified file 'mysql-test/suite/federated/federated.result'
--- a/mysql-test/suite/federated/federated.result 2010-10-21 09:49:16 +0000
+++ b/mysql-test/suite/federated/federated.result 2011-07-05 16:06:34 +0000
@@ -60,7 +60,7 @@ CREATE TABLE federated.t1 (
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
CONNECTION='mysql://user:pass@stripped:SLAVE_PORT/federated/t1';
SELECT * FROM federated.t1;
-ERROR HY000: Unable to connect to foreign data source: Access denied for user 'user'@'localhost' (using password: NO)
+ERROR HY000: Unable to connect to foreign data source: Access denied for user 'user'@'localhost' (using password: YES)
DROP TABLE federated.t1;
CREATE TABLE federated.t1 (
`id` int(20) NOT NULL,
=== modified file 'mysql-test/t/plugin_auth.test'
--- a/mysql-test/t/plugin_auth.test 2011-04-07 09:55:09 +0000
+++ b/mysql-test/t/plugin_auth.test 2011-07-05 16:06:34 +0000
@@ -513,4 +513,18 @@ SELECT IS_NULLABLE, COLUMN_NAME FROM INF
ORDER BY COLUMN_NAME;
+--echo #
+--echo # Bug # 11766641: 59792: BIN/MYSQL -UUNKNOWN -PUNKNOWN
+--echo # .-> USING PASSWORD: NO
+--echo #
+
+--echo # shoud contain "using password=yes"
+--error 1
+--exec $MYSQL -uunknown -punknown 2>&1
+
+--echo # shoud contain "using password=no"
+--error 1
+--exec $MYSQL -uunknown 2>&1
+
+
--echo End of 5.5 tests
=== modified file 'sql/sql_acl.cc'
--- a/sql/sql_acl.cc 2011-07-05 08:15:52 +0000
+++ b/sql/sql_acl.cc 2011-07-05 16:06:34 +0000
@@ -8313,7 +8313,7 @@ static bool find_mpvio_user(MPVIO_EXT *m
if (!mpvio->acl_user)
{
- login_failed_error(mpvio, 0);
+ login_failed_error(mpvio, mpvio->auth_info.password_used);
DBUG_RETURN (1);
}
@@ -8761,6 +8761,14 @@ static ulong parse_client_handshake_pack
return packet_error;
}
+ /*
+ Set the default for the password supplied flag for non-existing users
+ as the default plugin (native passsword authentication) would do it
+ for compatibility reasons.
+ */
+ if (passwd_len)
+ mpvio->auth_info.password_used= PASSWORD_USED_YES;
+
size_t client_plugin_len= 0;
char *client_plugin= get_string(&end, &bytes_remaining_in_packet,
&client_plugin_len);
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk branch (Georgi.Kodinov:3244 to 3245) | Georgi Kodinov | 5 Jul |