From ace649189d566532a46ff110db15ccde117ce4af Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Nov 2001 15:34:37 +0200 Subject: Better optimization for InnoDB and BDB tables for ORDER BY Build-tools/Do-compile: Merge with 4.0 Docs/manual.texi: Changelog mysql-test/r/innodb.result: New tests cases for ORDER BY mysql-test/r/myisam.result: New tests cases for ORDER BY mysql-test/t/innodb.test: New tests cases for ORDER BY mysql-test/t/myisam.test: New tests cases for ORDER BY --- mysql-test/t/myisam.test | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'mysql-test/t/myisam.test') diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 5b483b969bc..eb1d9a01020 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -48,3 +48,19 @@ show index from t1; optimize table t1; show index from t1; drop table t1; + +# +# Test of how ORDER BY works when doing it on the whole table +# + +create table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) type=myisam; +insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4); +explain select * from t1 order by a; +explain select * from t1 order by b; +explain select * from t1 order by c; +explain select a from t1 order by a; +explain select b from t1 order by b; +explain select a,b from t1 order by b; +explain select a,b from t1; +explain select a,b,c from t1; +drop table t1; -- cgit v1.2.1