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

MDEV-11240: Server crashes in check_view_single_update or Assertion `derived->table' failed in mysql_derived_merge_for_insert

Before "merge" view shoud be inited to maintaing transitive attributes like "multitable".
This commit is contained in:
Oleksandr Byelkin
2017-08-16 19:18:39 +02:00
parent e866e4cdbe
commit bcc1ba9218
3 changed files with 3 additions and 9 deletions

View File

@ -510,6 +510,8 @@ bool mysql_derived_merge_for_insert(THD *thd, LEX *lex, TABLE_LIST *derived)
DBUG_ENTER("mysql_derived_merge_for_insert");
if (derived->merged_for_insert)
DBUG_RETURN(FALSE);
if (derived->init_derived(thd, FALSE))
DBUG_RETURN(TRUE);
if (derived->is_materialized_derived())
DBUG_RETURN(mysql_derived_prepare(thd, lex, derived));
if ((thd->lex->sql_command == SQLCOM_UPDATE_MULTI ||
@ -526,8 +528,6 @@ bool mysql_derived_merge_for_insert(THD *thd, LEX *lex, TABLE_LIST *derived)
derived->merged_for_insert= TRUE;
}
}
else
derived->table= derived->merge_underlying_list->table;
DBUG_RETURN(FALSE);
}