diff options
Diffstat (limited to 'mysql-test/main/stat_tables.test')
-rw-r--r-- | mysql-test/main/stat_tables.test | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/main/stat_tables.test b/mysql-test/main/stat_tables.test index 93caa47ce79..ddf881c69ae 100644 --- a/mysql-test/main/stat_tables.test +++ b/mysql-test/main/stat_tables.test @@ -453,6 +453,27 @@ delete from mysql.table_stats; delete from mysql.column_stats; delete from mysql.index_stats; +--echo # +--echo # MDEV-19352: Server crash in alloc_histograms_for_table_share upon query from information schema +--echo # + +use test; +set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity; +set @@optimizer_use_condition_selectivity= 4; +set use_stat_tables='preferably'; + +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (b INT); +CREATE VIEW v AS SELECT * FROM t1 JOIN t2; +--error ER_NO_SUCH_TABLE +INSERT INTO t2 SELECT * FROM x; + +select * from information_schema.tables where table_name='v'; + +drop table t1,t2; +drop view v; +set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity; + set @save_optimizer_switch=@@optimizer_switch; set use_stat_tables=@save_use_stat_tables; |