summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2004-11-21 19:33:49 +0200
committerbell@sanja.is.com.ua <>2004-11-21 19:33:49 +0200
commit21eb2e2eae5387aa01f8e600180a194f1f2d6a37 (patch)
treeb25b7816dbd02cb9f9d6b4b3265bab0d91d3f02e /sql/sql_load.cc
parent0ef0b030a54e7e1f233cbd735f18f64af618d819 (diff)
downloadmariadb-git-21eb2e2eae5387aa01f8e600180a194f1f2d6a37.tar.gz
post merge
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r--sql/sql_load.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 40529103f00..c3a7f6ad230 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -121,9 +121,12 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
table_list->lock_type= lock_type;
if ((res= open_and_lock_tables(thd, table_list)))
DBUG_RETURN(res);
- if (setup_tables(thd, table_list, &unused_conds))
+ if (setup_tables(thd, table_list, &unused_conds,
+ &thd->lex->select_lex.leaf_tables, 0))
DBUG_RETURN(-1);
- if (!table_list->updatable || check_key_in_view(thd, table_list))
+ if (!table_list->table || // do not suport join view
+ !table_list->updatable || // and derived tables
+ check_key_in_view(thd, table_list))
{
my_error(ER_NON_UPDATABLE_TABLE, MYF(0), table_list->alias, "LOAD");
DBUG_RETURN(-1);