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_statistics.cc | |
parent | 08b0b70daa43a539d911238e25998f7450bab9e6 (diff) | |
download | mariadb-git-00f54b56b1eca3e4daf737107dd9097d9634f9ac.tar.gz |
cleanup: RAII helper for changing thd->count_cuted_rows
Diffstat (limited to 'sql/sql_statistics.cc')
-rw-r--r-- | sql/sql_statistics.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc index df4d67d3d11..a84e2449a55 100644 --- a/sql/sql_statistics.cc +++ b/sql/sql_statistics.cc @@ -2831,7 +2831,6 @@ int read_statistics_for_table(THD *thd, TABLE *table, TABLE_LIST *stat_tables) Field **field_ptr; KEY *key_info, *key_info_end; TABLE_SHARE *table_share= table->s; - enum_check_fields old_check_level= thd->count_cuted_fields; DBUG_ENTER("read_statistics_for_table"); DEBUG_SYNC(thd, "statistics_mem_alloc_start1"); @@ -2847,7 +2846,7 @@ int read_statistics_for_table(THD *thd, TABLE *table, TABLE_LIST *stat_tables) } /* Don't write warnings for internal field conversions */ - thd->count_cuted_fields= CHECK_FIELD_IGNORE; + Check_level_instant_set check_level_save(thd, CHECK_FIELD_IGNORE); /* Read statistics from the statistical table table_stats */ Table_statistics *read_stats= table_share->stats_cb.table_stats; @@ -2929,7 +2928,6 @@ int read_statistics_for_table(THD *thd, TABLE *table, TABLE_LIST *stat_tables) } } - thd->count_cuted_fields= old_check_level; table_share->stats_cb.end_stats_load(); DBUG_RETURN(0); } |