diff options
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 5ee0687c064..9c9336264f7 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -429,6 +429,7 @@ class Item_func_in :public Item_int_func class Item_func_isnull :public Item_bool_func { + enum Item_result internal_result_type; public: Item_func_isnull(Item *a) :Item_bool_func(a) {} longlong val_int(); @@ -437,6 +438,7 @@ public: { decimals=0; max_length=1; maybe_null=0; Item_func_isnull::update_used_tables(); + internal_result_type=args[0]->result_type(); } const char *func_name() const { return "isnull"; } /* Optimize case of not_null_column IS NULL */ @@ -455,11 +457,16 @@ public: class Item_func_isnotnull :public Item_bool_func { + enum Item_result internal_result_type; public: Item_func_isnotnull(Item *a) :Item_bool_func(a) {} longlong val_int(); enum Functype functype() const { return ISNOTNULL_FUNC; } - void fix_length_and_dec() { decimals=0; max_length=1; maybe_null=0; } + void fix_length_and_dec() + { + decimals=0; max_length=1; maybe_null=0; + internal_result_type=args[0]->result_type(); + } const char *func_name() const { return "isnotnull"; } optimize_type select_optimize() const { return OPTIMIZE_NULL; } }; |