Loading mysql-test/include/mix1.inc +18 −10 Original line number Diff line number Diff line Loading @@ -6,6 +6,8 @@ # $other_engine_type must point to an all # time available storage engine # 2006-08 MySQL 5.1 MyISAM and MEMORY only # $test_foreign_keys -- 0, skip foreign key tests # -- 1, do not skip foreign key tests # have to be set before sourcing this script. # # Note: The comments/expectations refer to InnoDB. Loading Loading @@ -138,7 +140,7 @@ CREATE TABLE `t2` ( `id4` INT NOT NULL, UNIQUE (`id2`,`id4`), KEY (`id1`) ) ENGINE=InnoDB; ); INSERT INTO `t2`(`id1`,`id2`,`id3`,`id4`) VALUES (1,1,1,0), Loading @@ -150,6 +152,7 @@ INSERT INTO `t2`(`id1`,`id2`,`id3`,`id4`) VALUES SELECT `id1` FROM `t1` WHERE `id1` NOT IN (SELECT `id1` FROM `t2` WHERE `id2` = 1 AND `id3` = 2); DROP TABLE t1, t2; # # Bug #12882 min/max inconsistent on empty table # Loading Loading @@ -297,9 +300,14 @@ drop table t1; # CREATE TABLE t1 (id int(11) NOT NULL PRIMARY KEY, name varchar(20), INDEX (name)) ENGINE=InnoDB; CREATE TABLE t2 (id int(11) NOT NULL PRIMARY KEY, fkey int(11), FOREIGN KEY (fkey) REFERENCES t2(id)) ENGINE=InnoDB; INDEX (name)); CREATE TABLE t2 (id int(11) NOT NULL PRIMARY KEY, fkey int(11)); # CREATE TABLE t2 (id int(11) NOT NULL PRIMARY KEY, fkey int(11), # FOREIGN KEY (fkey) REFERENCES t2(id)); if ($test_foreign_keys) { ALTER TABLE t2 ADD FOREIGN KEY (fkey) REFERENCES t2(id); } INSERT INTO t1 VALUES (1,'A1'),(2,'A2'),(3,'B'); INSERT INTO t2 VALUES (1,1),(2,2),(3,2),(4,3),(5,3); Loading Loading @@ -378,7 +386,7 @@ CREATE TABLE `t2` ( `c` int(11) default NULL, PRIMARY KEY (`k`), UNIQUE KEY `idx_1` (`a`) ) ENGINE=InnoDB; ); insert into t2 ( a ) values ( 6 ) on duplicate key update c = ifnull( c, 0 ) + 1; Loading mysql-test/r/index_merge_innodb.result +40 −0 Original line number Diff line number Diff line Loading @@ -284,6 +284,46 @@ kp1='279' AND kp2='ELM0678' AND kp3='6' AND kp4='10' AND kp5 = 'R '; COUNT(*) 1 drop table t1; create table t1 ( key1 int not null, key2 int not null default 0, key3 int not null default 0 ); insert into t1(key1) values (1),(2),(3),(4),(5),(6),(7),(8); set @d=8; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; alter table t1 add index i2(key2); alter table t1 add index i3(key3); update t1 set key2=key1,key3=key1; explain select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index_merge i2,i3 i3,i2 4,4 NULL 9 Using sort_union(i3,i2); Using where select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40); key1 key2 key3 31 31 31 32 32 32 33 33 33 34 34 34 35 35 35 36 36 36 37 37 37 38 38 38 39 39 39 drop table t1; #---------------- 2-sweeps read Index merge test 2 ------------------------------- SET SESSION STORAGE_ENGINE = InnoDB; drop table if exists t1; Loading mysql-test/r/index_merge_myisam.result +40 −0 Original line number Diff line number Diff line Loading @@ -982,6 +982,46 @@ kp1='279' AND kp2='ELM0678' AND kp3='6' AND kp4='10' AND kp5 = 'R '; COUNT(*) 1 drop table t1; create table t1 ( key1 int not null, key2 int not null default 0, key3 int not null default 0 ); insert into t1(key1) values (1),(2),(3),(4),(5),(6),(7),(8); set @d=8; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; alter table t1 add index i2(key2); alter table t1 add index i3(key3); update t1 set key2=key1,key3=key1; explain select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index_merge i2,i3 i3,i2 4,4 NULL 11 Using sort_union(i3,i2); Using where select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40); key1 key2 key3 31 31 31 32 32 32 33 33 33 34 34 34 35 35 35 36 36 36 37 37 37 38 38 38 39 39 39 drop table t1; #---------------- 2-sweeps read Index merge test 2 ------------------------------- SET SESSION STORAGE_ENGINE = MyISAM; drop table if exists t1; Loading mysql-test/r/innodb_mysql.result +22 −3 Original line number Diff line number Diff line Loading @@ -99,7 +99,7 @@ CREATE TABLE `t2` ( `id4` INT NOT NULL, UNIQUE (`id2`,`id4`), KEY (`id1`) ) ENGINE=InnoDB; ); INSERT INTO `t2`(`id1`,`id2`,`id3`,`id4`) VALUES (1,1,1,0), (1,1,2,1), Loading Loading @@ -271,6 +271,25 @@ explain select distinct f1, f2 from t1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range NULL PRIMARY 5 NULL 3 Using index for group-by; Using temporary drop table t1; CREATE TABLE t1 (id int(11) NOT NULL PRIMARY KEY, name varchar(20), INDEX (name)); CREATE TABLE t2 (id int(11) NOT NULL PRIMARY KEY, fkey int(11)); ALTER TABLE t2 ADD FOREIGN KEY (fkey) REFERENCES t2(id); INSERT INTO t1 VALUES (1,'A1'),(2,'A2'),(3,'B'); INSERT INTO t2 VALUES (1,1),(2,2),(3,2),(4,3),(5,3); EXPLAIN SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id WHERE t1.name LIKE 'A%'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index PRIMARY,name name 23 NULL 3 Using where; Using index 1 SIMPLE t2 ref fkey fkey 5 test.t1.id 1 Using where; Using index EXPLAIN SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id WHERE t1.name LIKE 'A%' OR FALSE; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 index NULL fkey 5 NULL 5 Using index 1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.fkey 1 Using where DROP TABLE t1,t2; CREATE TABLE t1 (a int, b int); insert into t1 values (1,1),(1,2); CREATE TABLE t2 (primary key (a)) select * from t1; Loading Loading @@ -340,7 +359,7 @@ CREATE TABLE `t2` ( `c` int(11) default NULL, PRIMARY KEY (`k`), UNIQUE KEY `idx_1` (`a`) ) ENGINE=InnoDB; ); insert into t2 ( a ) values ( 6 ) on duplicate key update c = ifnull( c, 0 ) + 1; Loading mysql-test/t/disabled.def +0 −3 Original line number Diff line number Diff line Loading @@ -17,9 +17,6 @@ im_options : Bug#20294 2006-07-24 stewart Instance manager test #im_life_cycle : Bug#20368 2006-06-10 alik im_life_cycle test fails im_daemon_life_cycle : BUG#22379 2006-09-15 ingo im_daemon_life_cycle.test fails on merge of 5.1 -> 5.1-engines im_instance_conf : BUG#20294 2006-09-16 ingo Instance manager test im_instance_conf fails randomly index_merge_innodb : BUG#22398 2006-09-15 ingo index_merge_innodb.test fails on wrong result file index_merge_myisam : BUG#22404 2006-09-15 ingo index_merge_myisam.test fails on wrong result file innodb_mysql : BUG#22405 2006-09-15 ingo innodb_mysql.test fails on wrong result file concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog Loading Loading
mysql-test/include/mix1.inc +18 −10 Original line number Diff line number Diff line Loading @@ -6,6 +6,8 @@ # $other_engine_type must point to an all # time available storage engine # 2006-08 MySQL 5.1 MyISAM and MEMORY only # $test_foreign_keys -- 0, skip foreign key tests # -- 1, do not skip foreign key tests # have to be set before sourcing this script. # # Note: The comments/expectations refer to InnoDB. Loading Loading @@ -138,7 +140,7 @@ CREATE TABLE `t2` ( `id4` INT NOT NULL, UNIQUE (`id2`,`id4`), KEY (`id1`) ) ENGINE=InnoDB; ); INSERT INTO `t2`(`id1`,`id2`,`id3`,`id4`) VALUES (1,1,1,0), Loading @@ -150,6 +152,7 @@ INSERT INTO `t2`(`id1`,`id2`,`id3`,`id4`) VALUES SELECT `id1` FROM `t1` WHERE `id1` NOT IN (SELECT `id1` FROM `t2` WHERE `id2` = 1 AND `id3` = 2); DROP TABLE t1, t2; # # Bug #12882 min/max inconsistent on empty table # Loading Loading @@ -297,9 +300,14 @@ drop table t1; # CREATE TABLE t1 (id int(11) NOT NULL PRIMARY KEY, name varchar(20), INDEX (name)) ENGINE=InnoDB; CREATE TABLE t2 (id int(11) NOT NULL PRIMARY KEY, fkey int(11), FOREIGN KEY (fkey) REFERENCES t2(id)) ENGINE=InnoDB; INDEX (name)); CREATE TABLE t2 (id int(11) NOT NULL PRIMARY KEY, fkey int(11)); # CREATE TABLE t2 (id int(11) NOT NULL PRIMARY KEY, fkey int(11), # FOREIGN KEY (fkey) REFERENCES t2(id)); if ($test_foreign_keys) { ALTER TABLE t2 ADD FOREIGN KEY (fkey) REFERENCES t2(id); } INSERT INTO t1 VALUES (1,'A1'),(2,'A2'),(3,'B'); INSERT INTO t2 VALUES (1,1),(2,2),(3,2),(4,3),(5,3); Loading Loading @@ -378,7 +386,7 @@ CREATE TABLE `t2` ( `c` int(11) default NULL, PRIMARY KEY (`k`), UNIQUE KEY `idx_1` (`a`) ) ENGINE=InnoDB; ); insert into t2 ( a ) values ( 6 ) on duplicate key update c = ifnull( c, 0 ) + 1; Loading
mysql-test/r/index_merge_innodb.result +40 −0 Original line number Diff line number Diff line Loading @@ -284,6 +284,46 @@ kp1='279' AND kp2='ELM0678' AND kp3='6' AND kp4='10' AND kp5 = 'R '; COUNT(*) 1 drop table t1; create table t1 ( key1 int not null, key2 int not null default 0, key3 int not null default 0 ); insert into t1(key1) values (1),(2),(3),(4),(5),(6),(7),(8); set @d=8; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; alter table t1 add index i2(key2); alter table t1 add index i3(key3); update t1 set key2=key1,key3=key1; explain select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index_merge i2,i3 i3,i2 4,4 NULL 9 Using sort_union(i3,i2); Using where select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40); key1 key2 key3 31 31 31 32 32 32 33 33 33 34 34 34 35 35 35 36 36 36 37 37 37 38 38 38 39 39 39 drop table t1; #---------------- 2-sweeps read Index merge test 2 ------------------------------- SET SESSION STORAGE_ENGINE = InnoDB; drop table if exists t1; Loading
mysql-test/r/index_merge_myisam.result +40 −0 Original line number Diff line number Diff line Loading @@ -982,6 +982,46 @@ kp1='279' AND kp2='ELM0678' AND kp3='6' AND kp4='10' AND kp5 = 'R '; COUNT(*) 1 drop table t1; create table t1 ( key1 int not null, key2 int not null default 0, key3 int not null default 0 ); insert into t1(key1) values (1),(2),(3),(4),(5),(6),(7),(8); set @d=8; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; insert into t1 (key1) select key1+@d from t1; set @d=@d*2; alter table t1 add index i2(key2); alter table t1 add index i3(key3); update t1 set key2=key1,key3=key1; explain select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index_merge i2,i3 i3,i2 4,4 NULL 11 Using sort_union(i3,i2); Using where select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40); key1 key2 key3 31 31 31 32 32 32 33 33 33 34 34 34 35 35 35 36 36 36 37 37 37 38 38 38 39 39 39 drop table t1; #---------------- 2-sweeps read Index merge test 2 ------------------------------- SET SESSION STORAGE_ENGINE = MyISAM; drop table if exists t1; Loading
mysql-test/r/innodb_mysql.result +22 −3 Original line number Diff line number Diff line Loading @@ -99,7 +99,7 @@ CREATE TABLE `t2` ( `id4` INT NOT NULL, UNIQUE (`id2`,`id4`), KEY (`id1`) ) ENGINE=InnoDB; ); INSERT INTO `t2`(`id1`,`id2`,`id3`,`id4`) VALUES (1,1,1,0), (1,1,2,1), Loading Loading @@ -271,6 +271,25 @@ explain select distinct f1, f2 from t1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range NULL PRIMARY 5 NULL 3 Using index for group-by; Using temporary drop table t1; CREATE TABLE t1 (id int(11) NOT NULL PRIMARY KEY, name varchar(20), INDEX (name)); CREATE TABLE t2 (id int(11) NOT NULL PRIMARY KEY, fkey int(11)); ALTER TABLE t2 ADD FOREIGN KEY (fkey) REFERENCES t2(id); INSERT INTO t1 VALUES (1,'A1'),(2,'A2'),(3,'B'); INSERT INTO t2 VALUES (1,1),(2,2),(3,2),(4,3),(5,3); EXPLAIN SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id WHERE t1.name LIKE 'A%'; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index PRIMARY,name name 23 NULL 3 Using where; Using index 1 SIMPLE t2 ref fkey fkey 5 test.t1.id 1 Using where; Using index EXPLAIN SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id WHERE t1.name LIKE 'A%' OR FALSE; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t2 index NULL fkey 5 NULL 5 Using index 1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.fkey 1 Using where DROP TABLE t1,t2; CREATE TABLE t1 (a int, b int); insert into t1 values (1,1),(1,2); CREATE TABLE t2 (primary key (a)) select * from t1; Loading Loading @@ -340,7 +359,7 @@ CREATE TABLE `t2` ( `c` int(11) default NULL, PRIMARY KEY (`k`), UNIQUE KEY `idx_1` (`a`) ) ENGINE=InnoDB; ); insert into t2 ( a ) values ( 6 ) on duplicate key update c = ifnull( c, 0 ) + 1; Loading
mysql-test/t/disabled.def +0 −3 Original line number Diff line number Diff line Loading @@ -17,9 +17,6 @@ im_options : Bug#20294 2006-07-24 stewart Instance manager test #im_life_cycle : Bug#20368 2006-06-10 alik im_life_cycle test fails im_daemon_life_cycle : BUG#22379 2006-09-15 ingo im_daemon_life_cycle.test fails on merge of 5.1 -> 5.1-engines im_instance_conf : BUG#20294 2006-09-16 ingo Instance manager test im_instance_conf fails randomly index_merge_innodb : BUG#22398 2006-09-15 ingo index_merge_innodb.test fails on wrong result file index_merge_myisam : BUG#22404 2006-09-15 ingo index_merge_myisam.test fails on wrong result file innodb_mysql : BUG#22405 2006-09-15 ingo innodb_mysql.test fails on wrong result file concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog Loading