summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
authorVarun Gupta <varun.gupta@mariadb.com>2019-01-30 19:35:40 +0530
committerVarun Gupta <varun.gupta@mariadb.com>2019-01-30 19:35:40 +0530
commit6092093cb99a71b0aec02b785087c0df307b1a66 (patch)
tree9fff4e5b579dbcc634cf9abfa82414ff9c0e01f2 /sql/sql_load.cc
parent08c05b5f34f7b301ba669a88df3b038f0c34d379 (diff)
downloadmariadb-git-6092093cb99a71b0aec02b785087c0df307b1a66.tar.gz
MDEV-15950: LOAD DATA INTO compex_view crashed
For multi-table views with LOAD, updates are not allowed, so we should just throw an error.
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r--sql/sql_load.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 27c0938c9a0..113cbe1dac0 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -251,6 +251,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))
{