diff options
author | Georgi Kodinov <kgeorge@mysql.com> | 2008-07-17 18:51:24 +0300 |
---|---|---|
committer | Georgi Kodinov <kgeorge@mysql.com> | 2008-07-17 18:51:24 +0300 |
commit | 804277fdbee91ab859506eaf2deef18ecec7bcdd (patch) | |
tree | aab43632f08db39d938c98978b7eb3336ae9689a /mysql-test/include/mix1.inc | |
parent | c137f3d450341dba2815a5a1cb4d7336349955e2 (diff) | |
parent | 99cc894f91328aec48a5fa9c45140ff61e357adc (diff) | |
download | mariadb-git-804277fdbee91ab859506eaf2deef18ecec7bcdd.tar.gz |
merge of bug #37830 to 5.1
Diffstat (limited to 'mysql-test/include/mix1.inc')
-rw-r--r-- | mysql-test/include/mix1.inc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc index c33cc5be588..f4e9cf74b72 100644 --- a/mysql-test/include/mix1.inc +++ b/mysql-test/include/mix1.inc @@ -1103,6 +1103,24 @@ set @my_innodb_commit_concurrency=@@global.innodb_commit_concurrency; set global innodb_commit_concurrency=0; set global innodb_commit_concurrency=@my_innodb_commit_concurrency; +# +# Bug #37830: ORDER BY ASC/DESC - no difference +# + +CREATE TABLE t1 (a int, b int, c int, PRIMARY KEY (a), KEY t1_b (b)) + ENGINE=InnoDB; + +INSERT INTO t1 (a,b,c) VALUES (1,1,1), (2,1,1), (3,1,1), (4,1,1); +INSERT INTO t1 (a,b,c) SELECT a+4,b,c FROM t1; + +# should be range access +EXPLAIN SELECT a, b, c FROM t1 WHERE b = 1 ORDER BY a DESC LIMIT 5; + +# should produce '8 7 6 5 4' for a +SELECT a, b, c FROM t1 WHERE b = 1 ORDER BY a DESC LIMIT 5; + +DROP TABLE t1; + --echo End of 5.0 tests # Fix for BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY |