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

BUG#818280: crash in do_copy_not_null() in maria-5.3 with semijoin

- Make simplify_joins() set maybe_null=FALSE for tables that were on the 
  inner sides of inner joins and then were moved to the inner sides of semi-joins.
This commit is contained in:
Sergey Petrunya
2011-08-16 21:42:25 +04:00
parent d2206ad149
commit c9494dc42d
4 changed files with 56 additions and 0 deletions

View File

@ -11928,6 +11928,18 @@ simplify_joins(JOIN *join, List<TABLE_LIST> *join_list, COND *conds, bool top,
leave it intact (otherwise it is flattened)
*/
join->select_lex->sj_nests.push_back(table);
/*
Also, walk through semi-join children and mark those that are now
top-level
*/
TABLE_LIST *tbl;
List_iterator<TABLE_LIST> it(nested_join->join_list);
while ((tbl= it++))
{
if (!tbl->on_expr && tbl->table)
tbl->table->maybe_null= FALSE;
}
}
else if (nested_join && !table->on_expr)
{