mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +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:
committed by
Marko Mäkelä
parent
7d8d37c31d
commit
69d7bfd970
@ -604,5 +604,18 @@ SELECT * FROM mysql.column_stats;
|
||||
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
|
||||
DROP TABLE t1;
|
||||
set use_stat_tables=@save_use_stat_tables;
|
||||
#
|
||||
# MDEV-17023: Crash during read_histogram_for_table with optimizer_use_condition_selectivity set to 4
|
||||
#
|
||||
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;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL
|
||||
1 SIMPLE user ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join)
|
||||
set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity;
|
||||
set use_stat_tables=@save_use_stat_tables;
|
||||
set optimizer_switch=@save_optimizer_switch_for_stat_tables_test;
|
||||
SET SESSION STORAGE_ENGINE=DEFAULT;
|
||||
|
Reference in New Issue
Block a user