[Commits] Rev 4619: MDEV-7413: optimizer_use_condition_selectivity > 2 crashes 10.0.15+maria-1~wheezy in file:///home/psergey/dev2/10.0-look/

Sergey Petrunya psergey at askmonty.org
Wed Feb 25 15:58:39 EET 2015


At file:///home/psergey/dev2/10.0-look/

------------------------------------------------------------
revno: 4619
revision-id: psergey at askmonty.org-20150225135836-a5in0p5fonmz9vqu
parent: sergii at pisem.net-20150224131700-aivkhzqi5rbvpo3l
committer: Sergey Petrunya <psergey at askmonty.org>
branch nick: 10.0-look
timestamp: Wed 2015-02-25 16:58:36 +0300
message:
  MDEV-7413: optimizer_use_condition_selectivity > 2 crashes 10.0.15+maria-1~wheezy
  
  Add a testcase. The bug itself was fixed by the fix for MDEV-7316.
=== modified file 'mysql-test/r/selectivity_innodb.result'
--- a/mysql-test/r/selectivity_innodb.result	2015-02-06 04:09:08 +0000
+++ b/mysql-test/r/selectivity_innodb.result	2015-02-25 13:58:36 +0000
@@ -1512,6 +1512,30 @@ select * from t1 where col2 != true;
 col1	col2
 drop table t1;
 #
+# MDEV-7413: optimizer_use_condition_selectivity > 2 crashes 10.0.15+maria-1~wheezy
+#
+CREATE TABLE t1 (
+parent_id int,
+child_group_id int,
+child_user_id int,
+KEY (parent_id,child_group_id,child_user_id)
+) ENGINE=InnoDB;
+CREATE TABLE t2 (
+id int,
+lower_group_name varchar(255),
+directory_id int(20),
+UNIQUE KEY (directory_id)
+) ENGINE=InnoDB;
+CREATE TABLE t3 (id int) ENGINE=InnoDB;
+insert into t1 values (1,1,1),(2,2,2);
+insert into t2 values (10,'foo',10),(20,'bar',20);
+insert into t3 values (101),(102);
+set use_stat_tables = PREFERABLY, optimizer_use_condition_selectivity = 3;
+select * from t1, t2, t3 
+where t1.child_user_id=t3.id and t1.child_group_id is null and t2.lower_group_name='foo' and t1.parent_id=t2.id and t2.directory_id=10;
+parent_id	child_group_id	child_user_id	id	lower_group_name	directory_id	id
+drop table t1,t2,t3;
+#
 # End of 10.0 tests
 #
 set use_stat_tables= @tmp_ust;

=== modified file 'mysql-test/t/selectivity_innodb.test'
--- a/mysql-test/t/selectivity_innodb.test	2014-10-10 13:08:12 +0000
+++ b/mysql-test/t/selectivity_innodb.test	2015-02-25 13:58:36 +0000
@@ -80,6 +80,36 @@ select * from t1 where col2 != true;
 drop table t1;
 
 --echo #
+--echo # MDEV-7413: optimizer_use_condition_selectivity > 2 crashes 10.0.15+maria-1~wheezy
+--echo #
+
+CREATE TABLE t1 (
+  parent_id int,
+  child_group_id int,
+  child_user_id int,
+  KEY (parent_id,child_group_id,child_user_id)
+) ENGINE=InnoDB;
+
+CREATE TABLE t2 (
+  id int,
+  lower_group_name varchar(255),
+  directory_id int(20),
+  UNIQUE KEY (directory_id)
+) ENGINE=InnoDB;
+
+CREATE TABLE t3 (id int) ENGINE=InnoDB;
+
+insert into t1 values (1,1,1),(2,2,2);
+insert into t2 values (10,'foo',10),(20,'bar',20);
+insert into t3 values (101),(102);
+set use_stat_tables = PREFERABLY, optimizer_use_condition_selectivity = 3;
+
+select * from t1, t2, t3 
+where t1.child_user_id=t3.id and t1.child_group_id is null and t2.lower_group_name='foo' and t1.parent_id=t2.id and t2.directory_id=10;
+
+drop table t1,t2,t3;
+
+--echo #
 --echo # End of 10.0 tests
 --echo #
 



More information about the commits mailing list