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);
explain select * from t1 where a > 0 and a < 50;
table type possible_keys key key_len ref rows Extra
t1 range PRIMARY PRIMARY 4 NULL 1 Using where
drop table t1;
create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) type=innodb;
insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
...
...
@@ -836,8 +814,6 @@ create table mysqltest.t3 (a int not null) type= heap;
insert into mysqltest.t3 values(1);
commit;
drop database mysqltest;
show tables from mysqltest;
Got one of the listed errors
set autocommit=0;
create table t1 (a int not null) type= innodb;
insert into t1 values(1),(2);
...
...
@@ -870,30 +846,6 @@ a
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);
explain select * from t1 order by a;
table type possible_keys key key_len ref rows Extra
t1 index NULL PRIMARY 4 NULL 4
explain select * from t1 order by b;
table type possible_keys key key_len ref rows Extra
t1 index NULL b 4 NULL 4
explain select * from t1 order by c;
table type possible_keys key key_len ref rows Extra
t1 ALL NULL NULL NULL NULL 4 Using filesort
explain select a from t1 order by a;
table type possible_keys key key_len ref rows Extra
t1 index NULL PRIMARY 4 NULL 4 Using index
explain select b from t1 order by b;
table type possible_keys key key_len ref rows Extra
t1 index NULL b 4 NULL 4 Using index
explain select a,b from t1 order by b;
table type possible_keys key key_len ref rows Extra
t1 index NULL b 4 NULL 4 Using index
explain select a,b from t1;
table type possible_keys key key_len ref rows Extra
t1 index NULL b 4 NULL 4 Using index
explain select a,b,c from t1;
table type possible_keys key key_len ref rows Extra
t1 ALL NULL NULL NULL NULL 4
drop table t1;
create table t1 (t int not null default 1, key (t)) type=innodb;
desc t1;
...
...
@@ -1235,13 +1187,7 @@ insert into t1 (a) select b from t2;
select count(*) from t1;
count(*)
29267
explain select * from t1 where c between 1 and 10000;
table type possible_keys key key_len ref rows Extra
t1 range c c 5 NULL 1 Using where
update t1 set c=a;
explain select * from t1 where c between 1 and 10000;
table type possible_keys key key_len ref rows Extra
t1 ALL c NULL NULL NULL 27682 Using where
drop table t1,t2;
create table t1 (id int primary key auto_increment, fk int, index index_fk (fk)) type=innodb;
insert into t1 (id) values (null),(null),(null),(null),(null);