diff options
author | Varun Gupta <varun.gupta@mariadb.com> | 2019-01-29 14:18:35 +0200 |
---|---|---|
committer | Varun Gupta <varun.gupta@mariadb.com> | 2019-01-29 14:52:24 +0200 |
commit | 08c05b5f34f7b301ba669a88df3b038f0c34d379 (patch) | |
tree | 9a446f4cb85dfa024288b6be1e6be6c23d5a8d4d /sql/sql_load.cc | |
parent | eff71f39ddc117d09da5465f7ea9fe007ed89009 (diff) | |
download | mariadb-git-08c05b5f34f7b301ba669a88df3b038f0c34d379.tar.gz |
MDEV-15744: Assertion `derived->table' failed in mysql_derived_merge_for_insert
For singe-table views, we need to find the bottom most base table in the embedded views
and then update that table
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r-- | sql/sql_load.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 5029efa7d68..27c0938c9a0 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -233,8 +233,9 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, if (open_and_lock_tables(thd, table_list, TRUE, 0)) DBUG_RETURN(TRUE); - if (mysql_handle_single_derived(thd->lex, table_list, DT_MERGE_FOR_INSERT) || - mysql_handle_single_derived(thd->lex, table_list, DT_PREPARE)) + if (table_list->handle_derived(thd->lex, DT_MERGE_FOR_INSERT)) + DBUG_RETURN(TRUE); + if (mysql_handle_list_of_derived(thd->lex, table_list, DT_PREPARE)) DBUG_RETURN(TRUE); if (setup_tables_and_check_access(thd, &thd->lex->select_lex.context, &thd->lex->select_lex.top_join_list, |