summaryrefslogtreecommitdiff
path: root/mysql-test/t/innodb.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/innodb.test')
-rw-r--r--mysql-test/t/innodb.test27
1 files changed, 23 insertions, 4 deletions
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index 635a15baa41..5ca357efe90 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -6,6 +6,7 @@
--disable_warnings
drop table if exists t1,t2,t3;
+drop database if exists mysqltest;
--enable_warnings
create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) type=innodb;
@@ -45,9 +46,12 @@ update ignore t1 set id=id+1; # This will change all rows
select * from t1;
update ignore t1 set id=1023 where id=1010;
select * from t1 where parent_id=102;
-# explain select level from t1 where level=1;
-# explain select level,id from t1 where level=1;
-# explain select level,id,parent_id from t1 where level=1;
+--replace_column 9 #
+explain select level from t1 where level=1;
+--replace_column 9 #
+explain select level,id from t1 where level=1;
+--replace_column 9 #
+explain select level,id,parent_id from t1 where level=1;
select level,id from t1 where level=1;
select level,id,parent_id from t1 where level=1;
optimize table t1;
@@ -90,6 +94,7 @@ select * from t1;
create index skr on t1 (a);
insert into t1 values (3,""), (4,"testing");
analyze table t1;
+--replace_column 7 #
show keys from t1;
drop table t1;
@@ -228,6 +233,7 @@ drop table t1;
CREATE TABLE t1 (a int not null, b int not null,c int not null,
key(a),primary key(a,b), unique(c),key(a),unique(b));
+--replace_column 7 #
show index from t1;
drop table t1;
@@ -345,7 +351,8 @@ update ignore t1 set id=id+1; # This will change all rows
select * from t1;
update ignore t1 set id=1023 where id=1010;
select * from t1 where parent_id=102;
-# explain select level from t1 where level=1;
+--replace_column 9 #
+explain select level from t1 where level=1;
select level,id from t1 where level=1;
select level,id,parent_id from t1 where level=1;
select level,id from t1 where level=1 order by id;
@@ -402,6 +409,7 @@ create table t1 (a varchar(100) not null, primary key(a), b int not null) type=i
insert into t1 values("hello",1),("world",2);
select * from t1 order by b desc;
optimize table t1;
+--replace_column 7 #
show keys from t1;
drop table t1;
@@ -447,6 +455,7 @@ DROP TABLE t1;
create table t1 (a int primary key,b int, c int, d int, e int, f int, g int, h int, i int, j int, k int, l int, m int, n int, o int, p int, q int, r int, s int, t int, u int, v int, w int, x int, y int, z int, a1 int, a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int, b1 int, b2 int, b3 int, b4 int, b5 int, b6 int) type = innodb;
insert into t1 values (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
+--replace_column 9 #
explain select * from t1 where a > 0 and a < 50;
drop table t1;
@@ -573,13 +582,21 @@ drop table t1;
create table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) type=innodb;
insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4);
+--replace_column 9 #
explain select * from t1 order by a;
+--replace_column 9 #
explain select * from t1 order by b;
+--replace_column 9 #
explain select * from t1 order by c;
+--replace_column 9 #
explain select a from t1 order by a;
+--replace_column 9 #
explain select b from t1 order by b;
+--replace_column 9 #
explain select a,b from t1 order by b;
+--replace_column 9 #
explain select a,b from t1;
+--replace_column 9 #
explain select a,b,c from t1;
drop table t1;
@@ -840,8 +857,10 @@ insert into t1 (a) select b from t2;
insert into t2 (a) select b from t1;
insert into t1 (a) select b from t2;
select count(*) from t1;
+--replace_column 9 #
explain select * from t1 where c between 1 and 10000;
update t1 set c=a;
+--replace_column 9 #
explain select * from t1 where c between 1 and 10000;
drop table t1,t2;