mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge mysql.com:/home/mydev/mysql-5.0
into mysql.com:/home/mydev/mysql-5.0-bug5390
This commit is contained in:
@@ -873,7 +873,7 @@ bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list,
|
||||
{
|
||||
Item *fake_conds= 0;
|
||||
TABLE_LIST *duplicate;
|
||||
if ((duplicate= unique_table(table_list, table_list->next_global)))
|
||||
if ((duplicate= unique_table(thd, table_list, table_list->next_global)))
|
||||
{
|
||||
update_non_unique_table_error(table_list, "INSERT", duplicate);
|
||||
DBUG_RETURN(TRUE);
|
||||
@@ -2174,7 +2174,7 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
|
||||
query
|
||||
*/
|
||||
if (!(lex->current_select->options & OPTION_BUFFER_RESULT) &&
|
||||
unique_table(table_list, table_list->next_global))
|
||||
unique_table(thd, table_list, table_list->next_global))
|
||||
{
|
||||
/* Using same table for INSERT and SELECT */
|
||||
lex->current_select->options|= OPTION_BUFFER_RESULT;
|
||||
|
Reference in New Issue
Block a user