summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-03-04 16:46:58 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-03-04 16:46:58 +0200
commit9835f7b80fc0eaa7fe4969ae87ae1bfbcc7aa157 (patch)
tree8c12732d7d80790d1f70ed5e302398600b733186 /sql/sql_load.cc
parent74d648db12e100c628548fb2e5aa67de718bd1fb (diff)
parent91e4f00389483d22fa81517bbcdcd21499fd283a (diff)
downloadmariadb-git-9835f7b80fc0eaa7fe4969ae87ae1bfbcc7aa157.tar.gz
Merge 10.1 into 10.2
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 37ac168de43..8c2f17dac3f 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -384,8 +384,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,
@@ -401,6 +402,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))
{