1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix for replication of INSERT | REPLACE | CREATE ... SELECT

sql/sql_select.cc:
  Fix for repllication of INSERT | REPLACE | CREATE  ... SELECT
This commit is contained in:
unknown
2003-03-12 07:51:08 +02:00
parent 5cd07da765
commit 0e812fc4b1
2 changed files with 8 additions and 8 deletions

View File

@ -4469,16 +4469,13 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
error=0;
if (!table) // If sending data to client
{
//note that the call below may trigger binlog writing for some commands...
/*
The following will unlock all cursors if the command wasn't an
update command
*/
join_free(join);
if (join->result->send_eof())
error= 1; // Don't send error
/*
...which must be done before unlocking the read tables (otherwise
another thread may, quickly between unlock and binlog-write,
update the read table and write to the binlog, which will
result in badly ordered binlog events (and replication breaks).
*/
join_free(join); // Unlock all cursors
}
DBUG_PRINT("info",("%ld records output",join->send_records));
}