Fix for BUG#6522 "Replication fails due to a rolled back transaction in the binlog"
When we are writing a transaction to the binlog, we log BEGIN/COMMIT with zero error code. Example: all statements of trans succeeded, connection lost and so implicit rollback: we don't want ER_NET* errors to be logged in the BEGIN/ROLLBACK events, while statement events have 0. If there was really a serious error code, it's already in the statement events. sql/log.cc: When we write the cached binlog segment to disk binlog at COMMIT/ROLLBACK time: imagine this is rollback due to net timeout, after all statements of the transaction succeeded. Then we want a zero-error code in BEGIN. In other words, if there was a really serious error code it's already in the transaction's statement events. sql/sql_table.cc: out of date comment
Showing
Please register or sign in to comment