mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-26938 Support descending indexes internally in InnoDB (server part)
* 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 This includes a fix of MDEV-27432.
This commit is contained in:
@ -1,14 +1,9 @@
|
||||
#--disable_abort_on_error
|
||||
#
|
||||
# Simple test for the partition storage engine
|
||||
# Focuses on tests of ordered index read
|
||||
#
|
||||
-- source include/have_partition.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# Ordered index read, int type
|
||||
#
|
||||
@ -842,3 +837,12 @@ INSERT into t1 values (1, NULL, NULL), (2, NULL, '10');
|
||||
select * from t1 where a = 1 order by a desc, b desc;
|
||||
select * from t1 where a = 1 order by b desc;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-13756 Implement descending index: KEY (a DESC, b ASC)
|
||||
--echo #
|
||||
create table t1 (a int, b int, key(a desc)) partition by hash(a) partitions 4;
|
||||
insert into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6);
|
||||
explain select * from t1 order by a limit 3;
|
||||
select * from t1 order by a limit 3;
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user