diff options
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index bd41a3729d6..e581ed0af25 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -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, |