mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge 4.1 -> 5.0.
This commit is contained in:
@ -194,6 +194,8 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, SQL_LIST *order,
|
||||
else
|
||||
table->file->unlock_row(); // Row failed selection, release lock on it
|
||||
}
|
||||
if (thd->killed && !error)
|
||||
error= 1; // Aborted
|
||||
thd->proc_info="end";
|
||||
end_read_record(&info);
|
||||
free_io_cache(table); // Will not do any harm
|
||||
@ -376,7 +378,7 @@ bool multi_delete::send_data(List<Item> &values)
|
||||
table->status|= STATUS_DELETED;
|
||||
if (!(error=table->file->delete_row(table->record[0])))
|
||||
deleted++;
|
||||
else if (!table_being_deleted->next)
|
||||
else if (!table_being_deleted->next || table_being_deleted->table->file->has_transactions())
|
||||
{
|
||||
table->file->print_error(error,MYF(0));
|
||||
DBUG_RETURN(1);
|
||||
@ -395,6 +397,7 @@ bool multi_delete::send_data(List<Item> &values)
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
void multi_delete::send_error(uint errcode,const char *err)
|
||||
{
|
||||
DBUG_ENTER("multi_delete::send_error");
|
||||
@ -484,6 +487,8 @@ int multi_delete::do_deletes(bool from_send_error)
|
||||
deleted++;
|
||||
}
|
||||
end_read_record(&info);
|
||||
if (thd->killed && !local_error)
|
||||
local_error= 1;
|
||||
if (local_error == -1) // End of file
|
||||
local_error = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user