summaryrefslogtreecommitdiff
path: root/mysql-test/r/innodb.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/innodb.result')
-rw-r--r--mysql-test/r/innodb.result27
1 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result
index f0144af24a8..fce75e31708 100644
--- a/mysql-test/r/innodb.result
+++ b/mysql-test/r/innodb.result
@@ -873,3 +873,30 @@ select * from t1;
a
commit;
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;