1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

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.
This commit is contained in:
Igor Babaev
2019-06-17 14:23:10 -07:00
parent 039b8782d4
commit 167da05f55
4 changed files with 98 additions and 3 deletions

View File

@@ -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; }
};