mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed range optimzier bug (Bug #1828)
mysql-test/r/range.result: test for range optimzier bug mysql-test/t/range.test: test for range optimzier bug
This commit is contained in:
@ -290,3 +290,13 @@ t1 range a,b a 5 NULL 2 Using where
|
||||
SELECT * FROM t1 WHERE a IN(1,2) AND b=5;
|
||||
a b
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a int, b int, c int, INDEX (c,a,b));
|
||||
INSERT INTO t1 VALUES (1,0,0),(1,0,0),(1,0,0);
|
||||
INSERT INTO t1 VALUES (0,1,0),(0,1,0),(0,1,0);
|
||||
SELECT COUNT(*) FROM t1 WHERE (c=0 and a=1) or (c=0 and b=1);
|
||||
COUNT(*)
|
||||
6
|
||||
SELECT COUNT(*) FROM t1 WHERE (c=0 and b=1) or (c=0 and a=1);
|
||||
COUNT(*)
|
||||
6
|
||||
DROP TABLE t1;
|
||||
|
Reference in New Issue
Block a user