From 6c958d6e80f681c207f4298b754c8b18170d3224 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 20 Dec 2010 19:19:24 +0100 Subject: bug#683112 Maria 5.2 incorrectly reports "(using password: NO)" even when password is specified set thd->password appropriately also for cases when a user was not found. --- mysql-test/r/connect.result | 4 ++++ mysql-test/t/connect.test | 13 +++++++++++++ 2 files changed, 17 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/connect.result b/mysql-test/r/connect.result index 690a6fb3bc3..00602093425 100644 --- a/mysql-test/r/connect.result +++ b/mysql-test/r/connect.result @@ -237,5 +237,9 @@ ERROR 28000: Access denied for user 'mysqltest_up2'@'localhost' (using password: select user(), current_user(); user() current_user() mysqltest_up2@localhost mysqltest_up2@% +connect(localhost,mysqltest_nouser,newpw,test,MASTER_PORT,MASTER_SOCKET); +ERROR 28000: Access denied for user 'mysqltest_nouser'@'localhost' (using password: YES) +connect(localhost,mysqltest_nouser,,test,MASTER_PORT,MASTER_SOCKET); +ERROR 28000: Access denied for user 'mysqltest_nouser'@'localhost' (using password: NO) DROP USER mysqltest_up1@'%'; DROP USER mysqltest_up2@'%'; diff --git a/mysql-test/t/connect.test b/mysql-test/t/connect.test index a8c8b659c3c..8fbdd709364 100644 --- a/mysql-test/t/connect.test +++ b/mysql-test/t/connect.test @@ -352,6 +352,19 @@ connection pcon4; select user(), current_user(); disconnect pcon4; +# +# lpbug#683112 Maria 5.2 incorrectly reports "(using password: NO)" +# even when password is specified +# +# test "access denied" error for nonexisting user with and without a password +# +--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT +--error ER_ACCESS_DENIED_ERROR +connect(pcon5,localhost,mysqltest_nouser,newpw,,$MASTER_MYPORT,); +--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT +--error ER_ACCESS_DENIED_ERROR +connect(pcon5,localhost,mysqltest_nouser,,,$MASTER_MYPORT,); + connection default; DROP USER mysqltest_up1@'%'; DROP USER mysqltest_up2@'%'; -- cgit v1.2.1