1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-30373 Wrong result with range access

This issue was caused by the bug fix for
MDEV-30325 Wrong result upon range query using index condition

The bug could happen in the case of several overlapping key ranges
with OR
This commit is contained in:
Monty
2023-01-11 18:12:40 +02:00
parent 17858e03a7
commit 7d1df207c4
6 changed files with 57 additions and 5 deletions

View File

@ -3655,6 +3655,17 @@ b
SET @@optimizer_switch=@save_optimizer_switch;
drop table t1,t2;
#
# MDEV-30373 Wrong result with range access
#
CREATE TABLE t1 (pk int, a int, PRIMARY KEY (pk), KEY(a)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1,3),(2,6),(3,9);
SELECT * FROM t1 WHERE a < 8 OR ( pk BETWEEN 1 AND 5 AND a BETWEEN 7 AND 10 );
pk a
1 3
2 6
3 9
DROP TABLE t1;
#
# End of 10.5 tests
#
set global innodb_stats_persistent= @innodb_stats_persistent_save;