1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-17023: Crash during read_histogram_for_table with optimizer_use_condition_selectivity set to 4

No need to read statistics for tables that are not USER tables.
We allocate memory for structures to collect statistics only for USER TABLES.
This commit is contained in:
Varun Gupta
2018-08-24 01:59:02 +05:30
committed by Marko Mäkelä
parent 7d8d37c31d
commit 69d7bfd970
4 changed files with 41 additions and 0 deletions

View File

@ -356,3 +356,15 @@ SELECT * FROM mysql.column_stats;
DROP TABLE t1;
set use_stat_tables=@save_use_stat_tables;
--echo #
--echo # MDEV-17023: Crash during read_histogram_for_table with optimizer_use_condition_selectivity set to 4
--echo #
set @save_optimizer_use_condition_selectivity=@@optimizer_use_condition_selectivity;
set @@optimizer_use_condition_selectivity=4;
set @@use_stat_tables= PREFERABLY;
explain
SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user;
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
set use_stat_tables=@save_use_stat_tables;