diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2014-09-30 21:11:03 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2014-09-30 21:11:03 +0400 |
commit | 9aeeba48646cceaf7658cdbb4d9cdf47e6957c02 (patch) | |
tree | 8041a1931ff47779fc6c74dd29754c570fbd3462 /mysql-test/r/selectivity_innodb.result | |
parent | 4630732f258e7ea4db47b0be58c8904d50a21e67 (diff) | |
download | mariadb-git-9aeeba48646cceaf7658cdbb4d9cdf47e6957c02.tar.gz |
MDEV-6808: MariaDB 10.0.13 crash with optimizer_use_condition_selectivity > 1
Fix a trivial typo: in table_multi_eq_cond_selectivity(), reset the loop variable
between loops.
Diffstat (limited to 'mysql-test/r/selectivity_innodb.result')
-rw-r--r-- | mysql-test/r/selectivity_innodb.result | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/mysql-test/r/selectivity_innodb.result b/mysql-test/r/selectivity_innodb.result index 90f6dba83f1..96eedc0b415 100644 --- a/mysql-test/r/selectivity_innodb.result +++ b/mysql-test/r/selectivity_innodb.result @@ -1358,4 +1358,39 @@ set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivit DROP TABLE t1,t2; set use_stat_tables=@save_use_stat_tables; set optimizer_switch=@save_optimizer_switch_for_selectivity_test; +# +# MDEV-6808: MariaDB 10.0.13 crash with optimizer_use_condition_selectivity > 1 +# +set @tmp_mdev6808= @@optimizer_use_condition_selectivity; +SET optimizer_use_condition_selectivity = 2; +CREATE TABLE t1 ( +event_id int(11) unsigned NOT NULL AUTO_INCREMENT, +PRIMARY KEY (event_id) +) ENGINE=InnoDB; +CREATE TABLE t2 ( +repost_id int(11) unsigned NOT NULL AUTO_INCREMENT, +subject_type varchar(24) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, +subject_id int(11) unsigned NOT NULL, +object_type varchar(24) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, +object_id int(11) unsigned NOT NULL, +is_private int(1) NOT NULL DEFAULT '0', +PRIMARY KEY (repost_id), +UNIQUE KEY `BETWEEN` (subject_type,subject_id,object_type,object_id,is_private), +KEY SUBJECT (subject_type,subject_id), +KEY OBJECT (object_type,object_id) +) ENGINE=InnoDB; +SELECT +* +FROM +t2, t1 +WHERE +t2.object_type = 'event' AND +t2.object_id = t1.event_id AND +t2.is_private = 0 AND +t2.subject_id = 127994 AND +t2.subject_type in ('user') +; +repost_id subject_type subject_id object_type object_id is_private event_id +DROP TABLE t1, t2; +set optimizer_use_condition_selectivity=@tmp_mdev6808; SET SESSION STORAGE_ENGINE=DEFAULT; |