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:
10
sql/table.h
10
sql/table.h
@ -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);
|
||||
|
Reference in New Issue
Block a user