mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-14581 Server does not clear diagnostics between sessions
Amend previous patch, so it works in all cases (also for "change user" command, and for RESET CONNECTION in 10.3)
This commit is contained in:
@@ -16348,6 +16348,7 @@ static void test_change_user()
|
||||
const char *db= "mysqltest_user_test_database";
|
||||
int rc;
|
||||
MYSQL* conn;
|
||||
MYSQL_RES* res;
|
||||
DBUG_ENTER("test_change_user");
|
||||
myheader("test_change_user");
|
||||
|
||||
@@ -16484,6 +16485,20 @@ static void test_change_user()
|
||||
rc= mysql_change_user(conn, user_pw, pw, "");
|
||||
myquery(rc);
|
||||
|
||||
/* MDEV-14581 : Check that there are no warnings after change user.*/
|
||||
rc = mysql_query(conn,"SIGNAL SQLSTATE '01000'");
|
||||
myquery(rc);
|
||||
|
||||
rc = mysql_change_user(conn, user_pw, pw, "");
|
||||
myquery(rc);
|
||||
|
||||
rc = mysql_query(conn, "SHOW WARNINGS");
|
||||
myquery(rc);
|
||||
res = mysql_store_result(conn);
|
||||
rc = my_process_result_set(res);
|
||||
DIE_UNLESS(rc == 0);
|
||||
mysql_free_result(res);
|
||||
|
||||
rc= mysql_change_user(conn, user_no_pw, pw, db);
|
||||
DIE_UNLESS(rc);
|
||||
if (! opt_silent)
|
||||
|
Reference in New Issue
Block a user