diff options
author | unknown <bell@sanja.is.com.ua> | 2005-08-18 12:07:14 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2005-08-18 12:07:14 +0300 |
commit | 341f82212642e3be70f9237bb9604ab725e6033f (patch) | |
tree | 2f305675075aa9a83c6f6d14de574b91d7e63d49 /sql/item_cmpfunc.h | |
parent | 4d2bf4befcf6a91978c60b9a402301e864ed999e (diff) | |
download | mariadb-git-341f82212642e3be70f9237bb9604ab725e6033f.tar.gz |
stop on NULL comparison only if it is allowed (BUG#12509)
mysql-test/r/row.result:
Correct NULL handling in row comporison
mysql-test/t/row.test:
Correct NULL handling in row comporison (BUG#12509)
sql/item_cmpfunc.cc:
stop on NULL comparison only if it is allowed
sql/item_cmpfunc.h:
support optimisation in case of processing WHERE/HAVING, where NULL and FALSE are equal
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index a4165407159..6b0cf3e80c2 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -193,10 +193,11 @@ class Item_bool_func2 :public Item_int_func protected: Arg_comparator cmp; String tmp_value1,tmp_value2; + bool abort_on_null; public: Item_bool_func2(Item *a,Item *b) - :Item_int_func(a,b), cmp(tmp_arg, tmp_arg+1) {} + :Item_int_func(a,b), cmp(tmp_arg, tmp_arg+1), abort_on_null(FALSE) {} void fix_length_and_dec(); void set_cmp_func() { @@ -210,6 +211,7 @@ public: bool is_bool_func() { return 1; } CHARSET_INFO *compare_collation() { return cmp.cmp_collation.collation; } uint decimal_precision() const { return 1; } + void top_level_item() { abort_on_null=1; } friend class Arg_comparator; }; |