diff options
author | Igor Babaev <igor@askmonty.org> | 2019-06-17 14:23:10 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2019-06-17 14:23:10 -0700 |
commit | 167da05f554dbe27d16373f6f0b02408ee76dc94 (patch) | |
tree | 98ab99b8cad94a971c5b7cb7a6e0252cef15a192 /sql/item_cmpfunc.h | |
parent | 039b8782d4794f34c5f0219d8a8d21f6e21d74f1 (diff) | |
download | mariadb-git-167da05f554dbe27d16373f6f0b02408ee76dc94.tar.gz |
MDEV-19790 Wrong result for query with outer join and IS NOT TRUE predicate
in where clause
The classes Item_func_isnottrue and Item_func_isnotfalse inherited the
implementation of the eval_not_null_tables method from the Item_func
class. As a result the not_null_tables_cache was set incorrectly for
the objects of these classes. It led to improper conversion of outer
joins to inner joins when the where clause of the processed query
contained IS NOT TRUE or IS NOT FALSE predicates. The coverted query
in many cases produced a wrong result set.
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index b10dc2b8056..2eafa0b78da 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -183,6 +183,8 @@ public: Item_func_isnottrue(Item *a) : Item_func_truth(a, true, false) {} ~Item_func_isnottrue() {} virtual const char* func_name() const { return "isnottrue"; } + bool eval_not_null_tables(uchar *opt_arg) + { not_null_tables_cache= 0; return false; } }; @@ -209,6 +211,8 @@ public: Item_func_isnotfalse(Item *a) : Item_func_truth(a, false, false) {} ~Item_func_isnotfalse() {} virtual const char* func_name() const { return "isnotfalse"; } + bool eval_not_null_tables(uchar *opt_arg) + { not_null_tables_cache= 0; return false; } }; |