1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-16043 Assertion thd->Item_change_list::is_empty() failed in mysql_parse upon SELECT from a view reading from a versioned table

Lost restore_active_arena().
Using of Query_arena_stmt is suggested instead.
This commit is contained in:
Aleksey Midenkov
2018-04-28 14:18:02 +03:00
committed by Sergei Golubchik
parent 8b2fa0ab25
commit ce2cf855bf
3 changed files with 21 additions and 3 deletions

View File

@ -1602,10 +1602,12 @@ JOIN::optimize_inner()
/* Convert all outer joins to inner joins if possible */
conds= simplify_joins(this, join_list, conds, TRUE, FALSE);
if (thd->is_error())
DBUG_RETURN(1);
if (select_lex->save_leaf_tables(thd))
if (thd->is_error() || select_lex->save_leaf_tables(thd))
{
if (arena)
thd->restore_active_arena(arena, &backup);
DBUG_RETURN(1);
}
build_bitmap_for_nested_joins(join_list, 0);
sel->prep_where= conds ? conds->copy_andor_structure(thd) : 0;