From e7fd6ed3875bd91dbd30a62291ae471c35da8fdf Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Mon, 17 Jul 2017 22:34:07 +0200 Subject: MDEV-11240: Server crashes in check_view_single_update or Assertion `derived->table' failed in mysql_derived_merge_for_insert Move table pointer for single table view (even if it is view over other view) to make the access universal. --- sql/sql_derived.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sql') diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 20fca2de8cf..493f0eccc8c 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -525,7 +525,9 @@ bool mysql_derived_merge_for_insert(THD *thd, LEX *lex, TABLE_LIST *derived) derived->schema_table= derived->merge_underlying_list->schema_table; derived->merged_for_insert= TRUE; } - } + } + else + derived->table= derived->merge_underlying_list->table; DBUG_RETURN(FALSE); } -- cgit v1.2.1