mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
fixed not_null_tables() for IN() (BUG#9393)
(IN() remove NULL rows only for tables from first argument (value which we looking for in IN() list) but not for tables from IN() list) Also it will be better change Item::not_null_tables() to prohibit this optimisation by default for new created items in 5.0 or 5.1. mysql-test/r/select.result: IN with outer join condition mysql-test/t/select.test: IN with outer join condition sql/item_cmpfunc.h: correct not_null_tables() for IN
This commit is contained in:
@ -2515,3 +2515,12 @@ SELECT b FROM t1 WHERE b=0x8000000000000000;
|
||||
b
|
||||
9223372036854775808
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE `t1` ( `gid` int(11) default NULL, `uid` int(11) default NULL);
|
||||
CREATE TABLE `t2` ( `ident` int(11) default NULL, `level` char(16) default NULL);
|
||||
INSERT INTO `t2` VALUES (0,'READ');
|
||||
CREATE TABLE `t3` ( `id` int(11) default NULL, `name` char(16) default NULL);
|
||||
INSERT INTO `t3` VALUES (1,'fs');
|
||||
select * from t3 left join t1 on t3.id = t1.uid, t2 where t2.ident in (0, t1.gid, t3.id, 0);
|
||||
id name gid uid ident level
|
||||
1 fs NULL NULL 0 READ
|
||||
drop table t1,t2,t3;
|
||||
|
Reference in New Issue
Block a user