Bug #6522 | Replication fails due to a rolled back transaction in the binlog | ||
---|---|---|---|
Submitted: | 9 Nov 2004 14:00 | Modified: | 10 Nov 2004 14:15 |
Reporter: | Tony Little | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S2 (Serious) |
Version: | 4.0.18 | OS: | Linux (linux) |
Assigned to: | Guilhem Bichot | CPU Architecture: | Any |
[9 Nov 2004 14:00]
Tony Little
[9 Nov 2004 15:12]
Guilhem Bichot
Hi, If BEGIN/ROLLBACK got into the binlog, it's likely that one table updated by the transaction was _not_ a transactional table. You can check this by typing SHOW TABLE STATUS LIKE 'each_table_of_the_transaction'; what do you get? Error 1158 means that there was interruption of the client/server communication. So, what probably happened is that the connection started a transaction, updated some non-transactional table (like MyISAM, HEAP, MERGE...), then communication got interrupted so the MySQL database server had to rollback. But as a non-transactional table was updated, not writing anything to the binlog would not reflect those updates; those are better reflected by logging BEGIN; transaction; ROLLBACK; Now you are right, there is no reason 1158 found its way into binlog; as server got the error after executing the updates, logged error should be 0 (no error). I'm fixing this now.
[9 Nov 2004 15:38]
Tony Little
I double checked the entire transaction and all tables used in the queries are INNODB. No matter what, setting the error to 0 for the BEGIN and ROLLBACK in the binlog would take care of the issue.
[10 Nov 2004 14:15]
Guilhem Bichot
Ah, tables are InnoDB... I'd be interested in seeing the output of mysqlbinlog (one BEGIN/ROLLBACK block), and in knowing if any involved table was created with the TEMPORARY word (CREATE TEMPORARY TABLE). I just changed things so that an error code of 0 is logged for BEGIN/ROLLBACK/COMMIT, in the next 4.0. Thank you for your bug report. ChangeSet@1.2070.1.1, 2004-11-10 15:07:55+01:00, guilhem@mysql.com