1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt

into  moonbone.local:/mnt/gentoo64/work/25122-bug-5.0-opt-mysql
This commit is contained in:
evgen@moonbone.local
2007-03-02 00:10:25 +03:00
7 changed files with 19 additions and 13 deletions

View File

@ -640,7 +640,7 @@ bool mysql_prepare_update(THD *thd, TABLE_LIST *table_list,
/* Check that we are not using table that we are updating in a sub select */
{
TABLE_LIST *duplicate;
if ((duplicate= unique_table(thd, table_list, table_list->next_global)))
if ((duplicate= unique_table(thd, table_list, table_list->next_global, 0)))
{
update_non_unique_table_error(table_list, "UPDATE", duplicate);
my_error(ER_UPDATE_TABLE_USED, MYF(0), table_list->table_name);
@ -867,7 +867,7 @@ reopen_tables:
tl->lock_type != TL_READ_NO_INSERT)
{
TABLE_LIST *duplicate;
if ((duplicate= unique_table(thd, tl, table_list)))
if ((duplicate= unique_table(thd, tl, table_list, 0)))
{
update_non_unique_table_error(table_list, "UPDATE", duplicate);
DBUG_RETURN(TRUE);
@ -1086,7 +1086,7 @@ static bool safe_update_on_fly(THD *thd, JOIN_TAB *join_tab,
List<Item> *fields)
{
TABLE *table= join_tab->table;
if (unique_table(thd, table_ref, all_tables))
if (unique_table(thd, table_ref, all_tables, 0))
return 0;
switch (join_tab->type) {
case JT_SYSTEM: