mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Fix bug #9728 decreased functionality in "on duplicate key update"
Remove changes made by bug fix #8147. They strips list of insert_table_list to only insert table, which results in error reported in bug #9728. Added flag to Item to resolve ambigous fields reported in bug #8147.
This commit is contained in:
@@ -2086,7 +2086,8 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables,
|
||||
return (Field*) 0;
|
||||
}
|
||||
bool allow_rowid= tables && !tables->next; // Only one table
|
||||
for (; tables ; tables=tables->next)
|
||||
uint table_idx= 0;
|
||||
for (; tables ; tables=tables->next, table_idx++)
|
||||
{
|
||||
if (!tables->table)
|
||||
{
|
||||
@@ -2114,7 +2115,9 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables,
|
||||
name,thd->where);
|
||||
return (Field*) 0;
|
||||
}
|
||||
found=field;
|
||||
found= field;
|
||||
if (table_idx == 0 && item->item_flags & MY_ITEM_PREFER_1ST_TABLE)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found)
|
||||
|
||||
Reference in New Issue
Block a user