Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Incomplete
-
10.2.22, 10.2.23
-
Happened on Windows, but it should happen both on Windows and Linux
Description
Recently we got a crash on our MariaDB server, the call stack is
alloc_histograms_for_table_share
|
read_histograms_for_table
|
read_statistics_for_tables_if_needed
|
open_and_lock_tables
|
The main problem is that the it try to read histogram of a performance schema table. In my understand, only TABLE_CATEGORY_USER should be read statistics because on open_and_process_table it only init stats when table is TABLE_CATEGORY_USER.
But when try to read histogram, when call statistics_for_tables_is_needed, the statistics_for_tables_is_needed return true instead of false.
I found in this commit https://github.com/MariaDB/server/commit/10f6b7001bd7b683c013ae407c2c48793caa3633 ,
the code changed from
if (table_share && |
(table_share->table_category != TABLE_CATEGORY_USER ||
|
table_share->tmp_table != NO_TMP_TABLE))
|
return FALSE; |
to
if (table_share && |
table_share->table_category != TABLE_CATEGORY_USER
|
&& is_stat_table(tl->db, tl->alias))
|
return FALSE; |
which means only mysql stats table will be ignored. This code change may be not correct.
Attachments
Issue Links
- relates to
-
MDEV-16507 SIGSEGV when use_stat_tables = preferably and optimizer_use_condition_selectivity = 4
- Closed