summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/connect.result4
-rw-r--r--mysql-test/t/connect.test13
2 files changed, 17 insertions, 0 deletions
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@'%';