mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-27426 Wrong result upon query using index_merge with DESC key
Make QUICK_RANGE_SELECT::cmp_next() aware of reverse-ordered key parts. (QUICK_RANGE_SELECT::cmp_prev() uses key_cmp() and so it already works correctly)
This commit is contained in:
committed by
Sergei Golubchik
parent
96bdda6c96
commit
62760af4df
@@ -86,3 +86,13 @@ from information_schema.optimizer_trace;
|
||||
drop table t1;
|
||||
|
||||
set optimizer_trace=default;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-27426: Wrong result upon query using index_merge with DESC key
|
||||
--echo #
|
||||
|
||||
CREATE OR REPLACE TABLE t1 (pk INT, a INT, b int, KEY(a), PRIMARY KEY(pk DESC)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1,4,5),(2,9,6),(3,NULL,7),(4,NULL,8);
|
||||
|
||||
SELECT * FROM t1 WHERE pk > 10 OR a > 0;
|
||||
DROP TABLE t1;
|
||||
|
Reference in New Issue
Block a user