diff options
author | Igor Babaev <igor@askmonty.org> | 2013-04-08 17:40:58 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2013-04-08 17:40:58 -0700 |
commit | ddb84f909c4e03762ffe26e2bde9620ffa1d13fd (patch) | |
tree | ddf03f3bf22924782e8bb5245e7a7d1b64fc6597 /mysql-test/r/selectivity_innodb.result | |
parent | e3bf08d4b1c8d73072227f0920b6f4e8c6441591 (diff) | |
download | mariadb-git-ddb84f909c4e03762ffe26e2bde9620ffa1d13fd.tar.gz |
Fixed mdev-4378.
Uninitialized field cond_selectivity of the Field objects created
for the fields of a temporary table could cause an assertion abort.
Diffstat (limited to 'mysql-test/r/selectivity_innodb.result')
-rw-r--r-- | mysql-test/r/selectivity_innodb.result | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/r/selectivity_innodb.result b/mysql-test/r/selectivity_innodb.result index 2a639e922af..8123641ddea 100644 --- a/mysql-test/r/selectivity_innodb.result +++ b/mysql-test/r/selectivity_innodb.result @@ -943,6 +943,35 @@ Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (isnull(`test`.`t set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; DROP TABLE t1; set use_stat_tables=@save_use_stat_tables; +# +# Bug mdev-4378: 2-way join with a materialized IN subquery in WHERE +# when optimizer_use_condition_selectivity=4 +# +set use_stat_tables=PREFERABLY; +set histogram_size=50; +set histogram_type=SINGLE_PREC_HB; +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (8),(9),(6); +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (8),(1),(8),(9),(24),(6),(1),(6),(2),(4); +CREATE TABLE t3 (ln VARCHAR(16)) ENGINE=MyISAM; +INSERT INTO t3 VALUES +('smith'),('black'),('white'),('jones'), +('brown'),('taylor'),('anderson'),('taylor'); +ANALYZE TABLE t1, t2, t3; +Table Op Msg_type Msg_text +test.t1 analyze status OK +test.t2 analyze status OK +test.t3 analyze status OK +FLUSH TABLES; +set optimizer_use_condition_selectivity=4; +SELECT * FROM t1, t2 WHERE 'garcia' IN ( SELECT MIN( ln ) FROM t3 WHERE ln = 'sun' ); +a b +set histogram_size=@save_histogram_size; +set histogram_type=@save_histogram_type; +set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; +DROP TABLE t1,t2,t3; +set use_stat_tables=@save_use_stat_tables; set use_stat_tables=@save_use_stat_tables; set optimizer_switch=@save_optimizer_switch_for_selectivity_test; SET SESSION STORAGE_ENGINE=DEFAULT; |