summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-03-01 15:52:06 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2019-03-01 15:52:06 +0100
commitf2e1451740d417f1c9ea8626d937fbcacc91bb55 (patch)
treecd915badee79727c047208a7804181543cdb9c27 /sql/sql_load.cc
parente39d6e0c53bccaf0c6b2a0341f8deb420f5e79be (diff)
parent2d34713294d5339d1459911a46fa20395443b3c7 (diff)
downloadmariadb-git-f2e1451740d417f1c9ea8626d937fbcacc91bb55.tar.gz
Merge branch '10.0' into 10.1
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 45c5dc038fc..d75d911815a 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -293,8 +293,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 (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,
@@ -310,6 +311,11 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
my_error(ER_NON_UPDATABLE_TABLE, MYF(0), table_list->alias, "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))
{