1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00
This commit is contained in:
bell@sanja.is.com.ua
2004-11-21 20:08:12 +02:00
52 changed files with 1333 additions and 306 deletions

View File

@ -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)