1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +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:
Vladislav Vaintroub
2018-10-04 14:24:14 +01:00
parent 33fadbfefc
commit 7fefd53f94
3 changed files with 20 additions and 4 deletions

View File

@ -1332,6 +1332,11 @@ void THD::change_user(void)
cleanup_done= 0;
reset_killed();
thd_clear_errors(this);
/* Clear warnings. */
if (!get_stmt_da()->is_warning_info_empty())
get_stmt_da()->clear_warning_info(0);
init();
stmt_map.reset();
my_hash_init(&user_vars, system_charset_info, USER_VARS_HASH_SIZE, 0, 0,