diff options
author | Sergei Golubchik <serg@mariadb.org> | 2020-11-23 19:40:47 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-11-25 22:19:59 +0100 |
commit | 00f54b56b1eca3e4daf737107dd9097d9634f9ac (patch) | |
tree | 16cb53938925139c960d3186bf620219efd33285 /sql/sql_show.cc | |
parent | 08b0b70daa43a539d911238e25998f7450bab9e6 (diff) | |
download | mariadb-git-00f54b56b1eca3e4daf737107dd9097d9634f9ac.tar.gz |
cleanup: RAII helper for changing thd->count_cuted_rows
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 20e34269752..8f21d2009a6 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -3695,7 +3695,7 @@ static bool show_status_array(THD *thd, const char *wild, char name_buffer[NAME_CHAR_LEN]; int len; SHOW_VAR tmp, *var; - enum_check_fields save_count_cuted_fields= thd->count_cuted_fields; + Check_level_instant_set check_level_save(thd, CHECK_FIELD_IGNORE); bool res= FALSE; CHARSET_INFO *charset= system_charset_info; DBUG_ENTER("show_status_array"); @@ -3818,7 +3818,6 @@ static bool show_status_array(THD *thd, const char *wild, } } end: - thd->count_cuted_fields= save_count_cuted_fields; DBUG_RETURN(res); } @@ -4543,8 +4542,7 @@ fill_schema_table_by_open(THD *thd, MEM_ROOT *mem_root, Open_tables_backup *open_tables_state_backup, bool can_deadlock) { - Query_arena i_s_arena(mem_root, - Query_arena::STMT_CONVENTIONAL_EXECUTION), + Query_arena i_s_arena(mem_root, Query_arena::STMT_CONVENTIONAL_EXECUTION), backup_arena, *old_arena; LEX *old_lex= thd->lex, temp_lex, *lex; LEX_CSTRING db_name, table_name; @@ -5058,12 +5056,9 @@ end: class Warnings_only_error_handler : public Internal_error_handler { public: - bool handle_condition(THD *thd, - uint sql_errno, - const char* sqlstate, + bool handle_condition(THD *thd, uint sql_errno, const char* sqlstate, Sql_condition::enum_warning_level *level, - const char* msg, - Sql_condition ** cond_hdl) + const char* msg, Sql_condition ** cond_hdl) { if (sql_errno == ER_TRG_NO_DEFINER || sql_errno == ER_TRG_NO_CREATION_CTX) return true; |