mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fixed a problem for Q18 from DBT3/SF30 with innodb database instance:
the server crashed when running the query with persistent statistics enabled. The field KEY::read_stat.avg_frequency must be initialized to NULL for the keys of temporary tables.
This commit is contained in:
@ -1636,6 +1636,7 @@ void set_statistics_for_table(THD *thd, TABLE *table)
|
||||
key_info < key_info_end; key_info++)
|
||||
{
|
||||
key_info->is_statistics_from_stat_tables=
|
||||
(use_stat_table_mode > 1 && key_info->read_stat.avg_frequency[0] > 0.5);
|
||||
(use_stat_table_mode > 1 && key_info->read_stat.avg_frequency &&
|
||||
key_info->read_stat.avg_frequency[0] > 0.5);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user