diff options
Diffstat (limited to 'mysql-test/main/order_by.test')
-rw-r--r-- | mysql-test/main/order_by.test | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mysql-test/main/order_by.test b/mysql-test/main/order_by.test index b047a31c863..e0c00aee583 100644 --- a/mysql-test/main/order_by.test +++ b/mysql-test/main/order_by.test @@ -246,6 +246,7 @@ drop table t1; create table t1 (a int not null, b int, c varchar(10), key (a, b, c)); insert into t1 values (1, NULL, NULL), (1, NULL, 'b'), (1, 1, NULL), (1, 1, 'b'), (1, 1, 'b'), (2, 1, 'a'), (2, 1, 'b'), (2, 2, 'a'), (2, 2, 'b'), (2, 3, 'c'),(1,3,'b'); +insert into t1 select * from t1; explain select * from t1 where (a = 1 and b is null and c = 'b') or (a > 2) order by a desc; select * from t1 where (a = 1 and b is null and c = 'b') or (a > 2) order by a desc; @@ -551,8 +552,6 @@ create table t1 ( insert into t1 (`sid`, `wnid`) values ('10100','01019000000'),('37986','01019000000'),('37987','01019010000'), -('39560','01019090000'),('37989','01019000000'),('37990','01019011000'), -('37991','01019011000'),('37992','01019019000'),('37993','01019030000'), ('37994','01019090000'),('475','02070000000'),('25253','02071100000'), ('25255','02071100000'),('25256','02071110000'),('25258','02071130000'), ('25259','02071190000'),('25260','02071200000'),('25261','02071210000'), @@ -2039,6 +2038,8 @@ CREATE TABLE t2 ( --echo # t2 has a "good" index declaration order INSERT INTO t1 (id2,id3,id4) VALUES (1,1,1),(1,1,1),(1,1,1),(1,1,1),(1,0,1),(1,2,1),(1,3,1); +INSERT INTO t1 (id2,id3,id4) VALUES (1,1,1),(1,1,1),(1,1,1),(1,1,1),(1,0,1),(1,2,1),(1,3,1); +INSERT INTO t2 (id2,id3,id4) VALUES (1,1,1),(1,1,1),(1,1,1),(1,1,1),(1,0,1),(1,2,1),(1,3,1); INSERT INTO t2 (id2,id3,id4) VALUES (1,1,1),(1,1,1),(1,1,1),(1,1,1),(1,0,1),(1,2,1),(1,3,1); --echo # The following two must both use id_23_date and no "using filesort": |