1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1

into sanja.is.com.ua:/home/bell/mysql/bk/work-update-4.1


sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
This commit is contained in:
unknown
2004-09-16 17:47:53 +03:00
6 changed files with 70 additions and 20 deletions

View File

@ -2796,24 +2796,19 @@ unsent_create_error:
target_tbl;
target_tbl= target_tbl->next)
{
target_tbl->table= target_tbl->table_list->table;
/*
TABLE_LIST *orig= target_tbl->table_list;
target_tbl->table= orig->table;
/*
Multi-delete can't be constructed over-union => we always have
single SELECT on top and have to check underlaying SELECTs of it
*/
for (SELECT_LEX_UNIT *un= lex->select_lex.first_inner_unit();
un;
un= un->next_unit())
if (lex->select_lex.check_updateable_in_subqueries(orig->db,
orig->real_name))
{
if (un->first_select()->linkage != DERIVED_TABLE_TYPE &&
un->check_updateable(target_tbl->table_list->db,
target_tbl->table_list->real_name))
{
my_error(ER_UPDATE_TABLE_USED, MYF(0),
target_tbl->table_list->real_name);
res= -1;
break;
}
my_error(ER_UPDATE_TABLE_USED, MYF(0),
orig->real_name);
res= -1;
break;
}
}