summaryrefslogtreecommitdiff
path: root/mysql-test/include
diff options
context:
space:
mode:
authorunknown <gluh@eagle.(none)>2007-09-19 14:09:23 +0500
committerunknown <gluh@eagle.(none)>2007-09-19 14:09:23 +0500
commit0e8d541d58197ac5d55f72dbcbb7ab64da1f9252 (patch)
treee0de682c7f4e910f5fe8c8da1bb710531e6faf98 /mysql-test/include
parentc0850719bc7d02985c98b3ecf6c0ec0b0acecacf (diff)
parent95daa4ed71298cb74e7c4bae16485b86c6a02ffe (diff)
downloadmariadb-git-0e8d541d58197ac5d55f72dbcbb7ab64da1f9252.tar.gz
Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result: Auto merged mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result: Auto merged
Diffstat (limited to 'mysql-test/include')
-rw-r--r--mysql-test/include/mix1.inc23
1 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc
index a55e0f22a7c..e2a22303d9d 100644
--- a/mysql-test/include/mix1.inc
+++ b/mysql-test/include/mix1.inc
@@ -996,6 +996,29 @@ SELECT c,b FROM t1 GROUP BY c,b;
DROP TABLE t1;
+#
+# Bug #31001: ORDER BY DESC in InnoDB not working
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a), INDEX b (b)) ENGINE=InnoDB;
+INSERT INTO t1(a,b) VALUES (1,1), (2,2), (3,2);
+
+#The two queries below should produce different results, but they don't.
+query_vertical EXPLAIN SELECT * FROM t1 WHERE b=2 ORDER BY a ASC;
+SELECT * FROM t1 WHERE b=2 ORDER BY a ASC;
+query_vertical EXPLAIN SELECT * FROM t1 WHERE b=2 ORDER BY a DESC;
+SELECT * FROM t1 WHERE b=2 ORDER BY a DESC;
+
+query_vertical EXPLAIN SELECT * FROM t1 ORDER BY b ASC, a ASC;
+SELECT * FROM t1 ORDER BY b ASC, a ASC;
+query_vertical EXPLAIN SELECT * FROM t1 ORDER BY b DESC, a DESC;
+SELECT * FROM t1 ORDER BY b DESC, a DESC;
+query_vertical EXPLAIN SELECT * FROM t1 ORDER BY b ASC, a DESC;
+SELECT * FROM t1 ORDER BY b ASC, a DESC;
+query_vertical EXPLAIN SELECT * FROM t1 ORDER BY b DESC, a ASC;
+SELECT * FROM t1 ORDER BY b DESC, a ASC;
+
+DROP TABLE t1;
+
--echo End of 5.0 tests
# Fix for BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY