1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed bug mdev-4962.

When a non-nullable datetime field is used under an IS NULL predicate
of the WHERE condition in a query with outer joins the remove_eq_conds
function should check whether this field belongs to an inner table
of any outer join that can be, in a general case, a nested outer join.
This commit is contained in:
Igor Babaev
2013-08-29 10:56:12 -07:00
parent 650d3266bb
commit 37f18d2318
5 changed files with 86 additions and 1 deletions

View File

@ -1845,6 +1845,16 @@ struct TABLE_LIST
bool single_table_updatable();
bool is_inner_table_of_outer_join()
{
for (TABLE_LIST *tbl= this; tbl; tbl= tbl->embedding)
{
if (tbl->outer_join)
return true;
}
return false;
}
private:
bool prep_check_option(THD *thd, uint8 check_opt_type);
bool prep_where(THD *thd, Item **conds, bool no_where_clause);