diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2019-10-02 16:04:52 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2019-10-07 13:30:22 +0400 |
commit | adefaeffcce7c4ae0844f72dd920603b35285d40 (patch) | |
tree | e5396eeec14a2283b36f5b0ff208562a21e7ef99 /sql/sql_statistics.h | |
parent | e43791d4dc8feb2c02a08ce73c0bb0e2c320018c (diff) | |
download | mariadb-git-adefaeffcce7c4ae0844f72dd920603b35285d40.tar.gz |
MDEV-19536 - Server crash or ASAN heap-use-after-free in is_temporary_table /
read_statistics_for_tables_if_needed
Regression after 279a907, read_statistics_for_tables_if_needed() was
called after open_normal_and_derived_tables() failure.
Fixed by moving read_statistics_for_tables() call to a branch of
get_schema_stat_record() where result of open_normal_and_derived_tables()
is checked.
Removed THD::force_read_stats, added read_statistics_for_tables() instead.
Simplified away statistics_for_command_is_needed().
Diffstat (limited to 'sql/sql_statistics.h')
-rw-r--r-- | sql/sql_statistics.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_statistics.h b/sql/sql_statistics.h index 968f77cd2ca..71d727eab07 100644 --- a/sql/sql_statistics.h +++ b/sql/sql_statistics.h @@ -89,6 +89,7 @@ Use_stat_tables_mode get_use_stat_tables_mode(THD *thd) } int read_statistics_for_tables_if_needed(THD *thd, TABLE_LIST *tables); +int read_statistics_for_tables(THD *thd, TABLE_LIST *tables); int collect_statistics_for_table(THD *thd, TABLE *table); void delete_stat_values_for_table_share(TABLE_SHARE *table_share); int alloc_statistics_for_table(THD *thd, TABLE *table); |