1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Rollback UPDATE/DELETE statements on kill

nsure that rows in a multi-row INSERT DELAYED are inserted atomicly
This commit is contained in:
monty@mysql.com
2004-03-04 18:16:10 +02:00
parent 9c4b9e6df1
commit b9c4ee353d
5 changed files with 31 additions and 7 deletions

View File

@ -1236,8 +1236,15 @@ bool delayed_insert::handle_inserts(void)
pthread_mutex_lock(&mutex);
delete row;
/* Let READ clients do something once in a while */
if (group_count++ == max_rows)
/*
Let READ clients do something once in a while
We should however not break in the middle of a multi-line insert
if we have binary logging enabled as we don't want other commands
on this table until all entries has been processed
*/
if (group_count++ >= max_rows && (row= rows.head()) &&
(!(row->log_query & DELAYED_LOG_BIN && using_bin_log) ||
row->query))
{
group_count=0;
if (stacked_inserts || tables_in_use) // Let these wait a while