summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
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 530f4379530..bdc8880ec68 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -308,8 +308,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,
@@ -325,6 +326,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))
{