Commit 1c234737 authored by unknown's avatar unknown

anotehr fix for Item_func_isnotnull::not_null_tables()


mysql-test/r/join_outer.result:
  anotehr test for Item_func_isnotnull::not_null_tables()
mysql-test/t/join_outer.test:
  anotehr test for Item_func_isnotnull::not_null_tables()
parent 174a177c
...@@ -653,6 +653,10 @@ i i i ...@@ -653,6 +653,10 @@ i i i
select * from t1 natural left join t2 where (t2.i is not null)=0; select * from t1 natural left join t2 where (t2.i is not null)=0;
i i i i
1 NULL 1 NULL
select * from t1 natural left join t2 where (t2.i is not null) is not null;
i i
1 NULL
2 2
drop table t1,t2,t3; drop table t1,t2,t3;
create table t1 (f1 integer,f2 integer,f3 integer); create table t1 (f1 integer,f2 integer,f3 integer);
create table t2 (f2 integer,f4 integer); create table t2 (f2 integer,f4 integer);
......
...@@ -431,6 +431,7 @@ insert into t2 values(2),(3); ...@@ -431,6 +431,7 @@ insert into t2 values(2),(3);
insert into t3 values(2),(4); insert into t3 values(2),(4);
select * from t1 natural left join t2 natural left join t3; select * from t1 natural left join t2 natural left join t3;
select * from t1 natural left join t2 where (t2.i is not null)=0; select * from t1 natural left join t2 where (t2.i is not null)=0;
select * from t1 natural left join t2 where (t2.i is not null) is not null;
drop table t1,t2,t3; drop table t1,t2,t3;
# #
......
...@@ -916,7 +916,8 @@ public: ...@@ -916,7 +916,8 @@ public:
} }
const char *func_name() const { return "isnotnull"; } const char *func_name() const { return "isnotnull"; }
optimize_type select_optimize() const { return OPTIMIZE_NULL; } optimize_type select_optimize() const { return OPTIMIZE_NULL; }
table_map not_null_tables() const { return abort_on_null ? used_tables() : 0; } table_map not_null_tables() const
{ return abort_on_null ? not_null_tables_cache : 0; }
Item *neg_transformer(THD *thd); Item *neg_transformer(THD *thd);
void print(String *str); void print(String *str);
CHARSET_INFO *compare_collation() { return args[0]->collation.collation; } CHARSET_INFO *compare_collation() { return args[0]->collation.collation; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment