mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 02:30:06 +01:00
A very nasty bug in multi-table deletes & updates
This commit is contained in:
parent
aa9d81e658
commit
06f017aed4
1 changed files with 2 additions and 1 deletions
|
@ -1792,6 +1792,7 @@ mysql_execute_command(void)
|
|||
tables->grant.want_privilege=(SELECT_ACL & ~tables->grant.privilege);
|
||||
if ((res=open_and_lock_tables(thd,tables)))
|
||||
break;
|
||||
thd->select_limit=HA_POS_ERROR;
|
||||
if (!setup_fields(thd,tables,select_lex->item_list,1,0,0) &&
|
||||
!setup_fields(thd,tables,lex->value_list,0,0,0) && ! thd->fatal_error &&
|
||||
(result=new multi_update(thd,tables,select_lex->item_list,lex->duplicates,
|
||||
|
@ -2741,7 +2742,7 @@ void mysql_init_multi_delete(LEX *lex)
|
|||
{
|
||||
lex->sql_command = SQLCOM_DELETE_MULTI;
|
||||
mysql_init_select(lex);
|
||||
lex->select->select_limit=HA_POS_ERROR;
|
||||
lex->select->select_limit=lex->thd->select_limit=HA_POS_ERROR;
|
||||
lex->auxilliary_table_list=lex->select_lex.table_list;
|
||||
lex->select->table_list.elements=0;
|
||||
lex->select->table_list.first=0;
|
||||
|
|
Loading…
Add table
Reference in a new issue