From 76165dc76064ea5942c9f62c16fc4f59264226fc Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Sat, 5 Mar 2011 12:56:22 +0300 Subject: BUG#727667 Wrong result with OR + NOT NULL in maria-5.3 - put the code that sets HA_NULL_PART bit back - Fix test_if_ref/part_of_refkey() so that = NULL-ability of lookup columns does not prevent the equality from being removed (we now have early/late NULLs filtering which will filter out NULL values) = equality is not removed if it is ref_or_null access, and the value of the lookup column can alternate between the lookup value and NULL. --- mysql-test/t/null_key.test | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'mysql-test/t/null_key.test') diff --git a/mysql-test/t/null_key.test b/mysql-test/t/null_key.test index 1400c643203..695b2835610 100644 --- a/mysql-test/t/null_key.test +++ b/mysql-test/t/null_key.test @@ -263,3 +263,16 @@ SELECT * FROM t2 inner join t1 WHERE ( t1.a = 0 OR t1.a IS NULL) AND t2.a = 3 AN drop table t1, t2; -- echo End of 5.0 tests +--echo # +--echo # BUG#727667 Wrong result with OR + NOT NULL in maria-5.3 +--echo # + +CREATE TABLE t1 ( + f3 int(11), + f10 varchar(1), + KEY (f3) +); +INSERT INTO t1 VALUES ('9','k'),(NULL,'r'); +SELECT * FROM t1 WHERE (f3 = 83) OR (f10 = 'z' AND f3 IS NULL); +DROP TABLE t1; + -- cgit v1.2.1