Details
-
Bug
-
Status: In Review (View Workflow)
-
Blocker
-
Resolution: Unresolved
-
12.3
-
Q1/2026 Server Development
Description
While fixing MDEV-38649, discovered the following (regardless of whether the fix for that ticket is present):
MariaDB [test]> CREATE TABLE t2 (a INT, b INT not null, KEY(b)); |
Query OK, 0 rows affected (0.038 sec) |
|
|
MariaDB [test]> INSERT INTO t2 VALUES (2,8),(9,1),(4,6),(11,13),(15,17); |
Query OK, 5 rows affected (0.008 sec) |
Records: 5 Duplicates: 0 Warnings: 0
|
|
|
MariaDB [test]> SELECT a, b FROM t2 WHERE b != 10 and b < 30 ORDER BY b DESC; |
+------+----+ |
| a | b |
|
+------+----+ |
| 15 | 17 |
|
| 11 | 13 |
|
+------+----+ |
2 rows in set (0.002 sec) |
Meanwhile, MySQL 9.5.0:
mysql> CREATE TABLE t2 (a INT, b INT not null, KEY(b)); |
Query OK, 0 rows affected (0.040 sec) |
|
|
mysql> INSERT INTO t2 VALUES (2,8),(9,1),(4,6),(11,13),(15,17); |
Query OK, 5 rows affected (0.015 sec) |
Records: 5 Duplicates: 0 Warnings: 0
|
|
|
mysql> SELECT a, b FROM t2 WHERE b != 10 and b < 30 ORDER BY b DESC; |
+------+----+ |
| a | b |
|
+------+----+ |
| 15 | 17 |
|
| 11 | 13 |
|
| 2 | 8 |
|
| 4 | 6 |
|
| 9 | 1 |
|
+------+----+ |
5 rows in set (0.002 sec) |
Attachments
Issue Links
- relates to
-
MDEV-38649 Wrong result (missing rows) upon condition pushdown on table with DESC key
-
- In Review
-
-
MDEV-38934 ICP, Reverse scan: range access will scan whole index for range w/o max endpoint
-
- In Review
-