LP bug#994275 fix.

In 5.3 we substitute constants in ref access values it can't be null so we do not need add NOT NULL for early NULL filtering.
This commit is contained in:
unknown 2012-05-07 21:14:37 +03:00
commit ea8314fdd5
5 changed files with 61 additions and 0 deletions

View file

@ -5101,3 +5101,15 @@ Warning 1292 Incorrect datetime value: 'aa'
DROP TABLE t1;
DROP VIEW v1;
SET optimizer_switch=@save_optimizer_switch;
#
# LP bug#994275 Assertion `real->type() == Item::FIELD_ITEM' failed
# in add_not_null_conds(JOIN*) with JOIN, ZEROFILL column, PK
#
CREATE TABLE t1 ( a INT(6) ZEROFILL );
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 ( b INT PRIMARY KEY );
INSERT INTO t2 VALUES (3),(4);
SELECT * FROM t1, t2 WHERE a=3 AND a=b;
a b
drop table t1,t2;
End of 5.3 tests