mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
14 lines
462 B
Text
14 lines
462 B
Text
|
drop table if exists t0,t1,t2,t3;
|
||
|
#
|
||
|
# MDEV-6434: Wrong result (extra rows) with ORDER BY, multiple-column index, InnoDB
|
||
|
#
|
||
|
CREATE TABLE t1 (a INT, b INT, c INT, d TEXT, KEY idx(a,b,c)) ENGINE=InnoDB;
|
||
|
INSERT INTO t1 (a,c) VALUES
|
||
|
(8, 9),(8, 10),(13, 15),(16, 17),(16, 18),(16, 19),(20, 21),
|
||
|
(20, 22),(20, 24),(20, 25),(20, 26),(20, 27),(20, 28);
|
||
|
SELECT * FROM t1 WHERE a = 8 AND (b = 1 OR b IS NULL) ORDER BY c;
|
||
|
a b c d
|
||
|
8 NULL 9 NULL
|
||
|
8 NULL 10 NULL
|
||
|
DROP TABLE t1;
|