diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-03-06 09:00:52 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-03-06 09:00:52 +0200 |
commit | 2a791c53ad93c8bc1441dd227000234bd49c4990 (patch) | |
tree | 4c52ad715c99bd3c6681771d7cb77d451a34e216 /sql/sql_load.cc | |
parent | b5c72a843abee033e9ea6028e1a109f03afc4455 (diff) | |
parent | 723ffdb32ee785cbc511abc457eb70d41c2fcce3 (diff) | |
download | mariadb-git-2a791c53ad93c8bc1441dd227000234bd49c4990.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r-- | sql/sql_load.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc index da5356ffb4b..0228bf62708 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -387,8 +387,9 @@ int mysql_load(THD *thd, const 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 (thd->lex->handle_list_of_derived(table_list, DT_PREPARE)) DBUG_RETURN(TRUE); if (setup_tables_and_check_access(thd, &thd->lex->first_select_lex()->context, @@ -407,6 +408,11 @@ int mysql_load(THD *thd, const sql_exchange *ex, TABLE_LIST *table_list, my_error(ER_NON_UPDATABLE_TABLE, MYF(0), table_list->alias.str, "LOAD"); DBUG_RETURN(TRUE); } + if (table_list->is_multitable()) + { + my_error(ER_WRONG_USAGE, MYF(0), "Multi-table VIEW", "LOAD"); + DBUG_RETURN(TRUE); + } if (table_list->prepare_where(thd, 0, TRUE) || table_list->prepare_check_option(thd)) { |