summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2004-11-21 20:08:12 +0200
committerbell@sanja.is.com.ua <>2004-11-21 20:08:12 +0200
commit072d38eb129bcecb1afba5c5efb61bcc21e78fea (patch)
tree76a673d7a9b20f184988993cc14ce455b1d73f70 /sql/sql_load.cc
parent97a19706581e1cb0fce88fd6ba3ec8ca726a69ff (diff)
parent21eb2e2eae5387aa01f8e600180a194f1f2d6a37 (diff)
downloadmariadb-git-072d38eb129bcecb1afba5c5efb61bcc21e78fea.tar.gz
merge
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r--sql/sql_load.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index d9e4943f322..edd72851a21 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -121,9 +121,12 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
table_list->lock_type= lock_type;
if (open_and_lock_tables(thd, table_list))
DBUG_RETURN(TRUE);
- 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(TRUE);
@@ -143,7 +146,8 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
thd->dupp_field=0;
/* TODO: use this conds for 'WITH CHECK OPTIONS' */
Item *unused_conds= 0;
- if (setup_tables(thd, table_list, &unused_conds) ||
+ TABLE_LIST *leaves= 0;
+ if (setup_tables(thd, table_list, &unused_conds, &leaves, 0) ||
setup_fields(thd, 0, table_list, fields, 1, 0, 0))
DBUG_RETURN(TRUE);
if (thd->dupp_field)