summaryrefslogtreecommitdiff
path: root/mysql-test/main/order_by_innodb.test
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2021-11-24 16:50:21 +0100
committerSergei Golubchik <serg@mariadb.org>2021-12-11 17:25:28 +0100
commitdb4628bf97acd253ff6f137206181dcfd6ee94f9 (patch)
tree292ae0087672d3abb26fe5e00aeed9fd07b3d524 /mysql-test/main/order_by_innodb.test
parent52a9d82ecb5b14b89dc47549c45b88e6f07a53bb (diff)
downloadmariadb-git-db4628bf97acd253ff6f137206181dcfd6ee94f9.tar.gz
MDEV-26938 Support descending indexes internally in InnoDB (server part)preview-10.8-MDEV-26938-desc-indexes
* preserve DESC index property in the parser * store it in the frm (only for HA_KEY_ALG_BTREE) * read it from the frm * show it in SHOW CREATE * skip DESC indexes in opt_range.cc and opt_sum.cc * ORDER BY test
Diffstat (limited to 'mysql-test/main/order_by_innodb.test')
-rw-r--r--mysql-test/main/order_by_innodb.test14
1 files changed, 13 insertions, 1 deletions
diff --git a/mysql-test/main/order_by_innodb.test b/mysql-test/main/order_by_innodb.test
index 97c043b8dbc..db801ef79f3 100644
--- a/mysql-test/main/order_by_innodb.test
+++ b/mysql-test/main/order_by_innodb.test
@@ -1,7 +1,8 @@
#
# ORDER BY handling (e.g. filesort) tests that require innodb
#
--- source include/have_innodb.inc
+--source include/have_innodb.inc
+--source include/have_sequence.inc
--disable_warnings
drop table if exists t0,t1,t2,t3;
@@ -187,3 +188,14 @@ from
drop table t1,t2;
--echo # End of 10.2 tests
+
+--echo #
+--echo # MDEV-26938 Support descending indexes internally in InnoDB
+--echo #
+create table t1 (a int, b int, c int, key r (a desc, b asc));
+insert t1 select seq % 10, seq div 10, seq from seq_1_to_55;
+insert t1 values (NULL, NULL, NULL), (9, NULL, NULL);
+explain select * from t1 force index(r) order by a,b limit 20;
+explain select * from t1 force index(r) order by a desc,b limit 20;
+ select * from t1 force index(r) order by a desc,b limit 20;
+drop table t1;