diff options
author | unknown <serg@serg.mylan> | 2005-03-13 23:56:25 +0100 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2005-03-13 23:56:25 +0100 |
commit | 7a105affb2f74d9874ee3e0e4721788208549cbf (patch) | |
tree | a3dc3b28d35464516a5cc1c4942cca93e5d491a9 /sql/item_cmpfunc.h | |
parent | ec372b09fe061f44fa33e4ed2baa0ee8911955de (diff) | |
download | mariadb-git-7a105affb2f74d9874ee3e0e4721788208549cbf.tar.gz |
Item_func_isnotnull::not_null_tables - return 0 if not top-level item
mysql-test/r/join_outer.result:
test for some obscure usage of IS NOT NULL
mysql-test/t/join_outer.test:
test for some obscure usage of IS NOT NULL
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 38717672ba8..522f93b5e77 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -905,8 +905,9 @@ public: class Item_func_isnotnull :public Item_bool_func { + bool abort_on_null; public: - Item_func_isnotnull(Item *a) :Item_bool_func(a) {} + Item_func_isnotnull(Item *a) :Item_bool_func(a), abort_on_null(0) {} longlong val_int(); enum Functype functype() const { return ISNOTNULL_FUNC; } void fix_length_and_dec() @@ -915,10 +916,11 @@ public: } const char *func_name() const { return "isnotnull"; } optimize_type select_optimize() const { return OPTIMIZE_NULL; } - table_map not_null_tables() const { return used_tables(); } + table_map not_null_tables() const { return abort_on_null ? used_tables() : 0; } Item *neg_transformer(THD *thd); void print(String *str); CHARSET_INFO *compare_collation() { return args[0]->collation.collation; } + void top_level_item() { abort_on_null=1; } }; @@ -1004,7 +1006,7 @@ public: /* Item_cond() is only used to create top level items */ Item_cond(): Item_bool_func(), abort_on_null(1) { const_item_cache=0; } - Item_cond(Item *i1,Item *i2) + Item_cond(Item *i1,Item *i2) :Item_bool_func(), abort_on_null(0) { list.push_back(i1); |