diff options
author | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2011-05-16 19:46:44 +0300 |
---|---|---|
committer | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2011-05-16 19:46:44 +0300 |
commit | 8f73e64fff57fe4080cfc4d2816555b0d22b9e13 (patch) | |
tree | 9aa2410569c349f7dca2caa7bda01cba64ae8c4b /mysql-test | |
parent | 0fd26247800a6b9abf6eb6895ef47f6b3187be4e (diff) | |
download | mariadb-git-8f73e64fff57fe4080cfc4d2816555b0d22b9e13.tar.gz |
Bug #11766641: 59792: BIN/MYSQL -UUNKNOWN -PUNKNOWN
.-> USING PASSWORD: NO
The server was always setting the flag for using password to NO and
then relying on the server authentication plugin to update it if it uses
a password.
This creates compatibility problems with 5.1 when rejecting a
nonexistent user login.
Set the default for the password supplied flag for non-existing users
as the default plugin (native password authentication) would do it
for compatibility reasons.
Test case added.
federated.result updated with the correct error message.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/plugin_auth.result | 8 | ||||
-rw-r--r-- | mysql-test/suite/federated/federated.result | 2 | ||||
-rw-r--r-- | mysql-test/t/plugin_auth.test | 14 |
3 files changed, 23 insertions, 1 deletions
diff --git a/mysql-test/r/plugin_auth.result b/mysql-test/r/plugin_auth.result index 91a5d2d8478..fb4a38feb29 100644 --- a/mysql-test/r/plugin_auth.result +++ b/mysql-test/r/plugin_auth.result @@ -447,4 +447,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 diff --git a/mysql-test/suite/federated/federated.result b/mysql-test/suite/federated/federated.result index 4cd7b416621..db4ffc38213 100644 --- a/mysql-test/suite/federated/federated.result +++ b/mysql-test/suite/federated/federated.result @@ -60,7 +60,7 @@ CREATE TABLE federated.t1 ( ENGINE="FEDERATED" DEFAULT CHARSET=latin1 CONNECTION='mysql://user:pass@127.0.0.1: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, diff --git a/mysql-test/t/plugin_auth.test b/mysql-test/t/plugin_auth.test index a81cf4e4783..4745722fbbe 100644 --- a/mysql-test/t/plugin_auth.test +++ b/mysql-test/t/plugin_auth.test @@ -512,4 +512,18 @@ SELECT IS_NULLABLE, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS 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 |