mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug32815
This commit is contained in:
@ -1213,4 +1213,16 @@ a b
|
||||
3 2
|
||||
1 1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (id int, type char(6), d int, INDEX idx(id,d)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES
|
||||
(191, 'member', 1), (NULL, 'member', 3), (NULL, 'member', 4), (201, 'member', 2);
|
||||
EXPLAIN SELECT * FROM t1 WHERE id=191 OR id IS NULL ORDER BY d;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL idx NULL NULL NULL 3 Using where; Using filesort
|
||||
SELECT * FROM t1 WHERE id=191 OR id IS NULL ORDER BY d;
|
||||
id type d
|
||||
191 member 1
|
||||
NULL member 3
|
||||
NULL member 4
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
|
@ -960,4 +960,19 @@ SELECT * FROM t1 ORDER BY b DESC, a ASC;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #32815: query with ORDER BY and a possible ref_or_null access
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (id int, type char(6), d int, INDEX idx(id,d)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES
|
||||
(191, 'member', 1), (NULL, 'member', 3), (NULL, 'member', 4), (201, 'member', 2);
|
||||
|
||||
EXPLAIN SELECT * FROM t1 WHERE id=191 OR id IS NULL ORDER BY d;
|
||||
SELECT * FROM t1 WHERE id=191 OR id IS NULL ORDER BY d;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
Reference in New Issue
Block a user