summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-03-05 12:56:05 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-03-05 12:56:05 +0200
commit446b3ebdfc75f3a97d349d1347c4900a2e3eee03 (patch)
tree1fc75e520ac84591d2e2c647855f153a07ec3190 /sql/sql_load.cc
parent8f4de38f65ba89c6273c15c9adb50ab762d03f59 (diff)
parent90f09ba8c249e23e015ce9d1d56463869f1a5358 (diff)
downloadmariadb-git-446b3ebdfc75f3a97d349d1347c4900a2e3eee03.tar.gz
Merge 10.2 into 10.3
FIXME: Properly resolve conflicts between MDEV-18883 and MDEV-7742/MDEV-8305, and record the correct result for main.log_slow
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r--sql/sql_load.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index ddb5029c78a..b7e110e4b95 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->select_lex.context,
&thd->lex->select_lex.top_join_list,
@@ -404,6 +405,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))
{