1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Rollback UPDATE/DELETE statements on kill

nsure that rows in a multi-row INSERT DELAYED are inserted atomicly


mysql-test/mysql-test-run.sh:
  Make test case safe for openserver/unixware (Bug #2700)
sql/sql_delete.cc:
  Rollback statement on kill
sql/sql_insert.cc:
  Ensure that rows in a multi-row INSERT DELAYED are inserted atomicly (without releasing logs).
  This is needed to ensure that the mysqlbinlog is consistent.
  Bug #2491
sql/sql_list.h:
  Ensure that rows in a multi-row INSERT DELAYED is inserted atomicly (without releasing logs).
  This is needed to ensure that the mysqlbinlog is consistent.
  Bug #2491
sql/sql_update.cc:
  Rollback statement on kill
This commit is contained in:
unknown
2004-03-04 18:16:10 +02:00
parent eadfe4ddfa
commit 0b751edc57
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