| Bug #59079 | rpl_binlog_errors.test fails when enables binlog-checksum | ||
|---|---|---|---|
| Submitted: | 21 Dec 2010 5:41 | Modified: | 6 Jan 2011 5:00 |
| Reporter: | Zhenxing He | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Tests: Replication | Severity: | S3 (Non-critical) |
| Version: | 5.6 | OS: | Any |
| Assigned to: | Zhenxing He | CPU Architecture: | Any |
| Tags: | pb2, test failure | ||
[21 Dec 2010 7:49]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/127356 3447 He Zhenxing 2010-12-21 BUG#59079 rpl_binlog_errors.test fails when enables binlog-checksum The test case dependent on the size of incident event to calculate the event offset, howerver, the size of Incident_log_event is different when binlog-checksum is enabled, and caused the test case to fail. Fixed the problem by checking if binlog-checksum is enabled or not and use different size accordingly.
[22 Dec 2010 4:49]
Zhenxing He
I think this bug and BUG#59023 are duplicates.
[22 Dec 2010 6:34]
Alexander Nozdrin
Bug#59023 has been closed as a duplicate of this one.
[22 Dec 2010 9:18]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/127484 3467 He Zhenxing 2010-12-22 BUG#59079 rpl_binlog_errors.test fails when enables binlog-checksum The test case dependent on the size of incident event to calculate the event offset, howerver, the size of Incident_log_event is different when binlog-checksum is enabled, and caused the test case to fail. Fixed the problem by use the event sequence number instead event log file position to locate the incident event.
[22 Dec 2010 13:45]
Zhenxing He
pushed to trunk-bugfixing
[22 Dec 2010 21:31]
Bugs System
Pushed into mysql-trunk 5.6.1 (revid:alexander.nozdrin@oracle.com-20101222212842-y0t3ibtd32wd9qaw) (version source revid:alexander.nozdrin@oracle.com-20101222212842-y0t3ibtd32wd9qaw) (merge vers: 5.6.1) (pib:24)
[6 Jan 2011 5:00]
Jon Stephens
Changes in test code only; also, does not appear in a release. Closed.

Description: rpl_binlog_errors.test fails when enables binlog-checksum: ./mtr --mysqld=--binlog-checksum=crc32 rpl_binlog_errors rpl.rpl_binlog_errors 'mix' [ fail ] Test ended at 2010-12-21 13:29:32 CURRENT_TEST: rpl.rpl_binlog_errors mysqltest: At line 198: query 'SHOW BINLOG EVENTS IN '$binlog_file' FROM $binlog_start LIMIT 1' failed: 1220: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error How to repeat: The problem is that in the test it assumes the Incident_event size is 53, which is not correct when enables binlog-checksum because there will be an 4 bytes checksum attached to the event: .... # 53 is the size of the incident event, so we start from 22 bytes before the # current position -- let $binlog_start = `SELECT $binlog_start - 53` FLUSH LOGS; -- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR $binlog_start <binlog_start> $binlog_file BINLOG_FILE ... Suggested fix: An obvious fix is to check if binlog-checksum is enabled or not, and then use proper size for the event, but this can also break if we changed the event size again. So it would be better if we can calculate the size instead of using arbitrary values.