mariadb/mysql-test/suite
Alfranio Correia 5a0af47919 BUG#55675 rpl.rpl_log_pos fails sporadically with error binlog truncated in the middle
There are two calls to read_log_event() on master in mysql_binlog_send().
Each call reads 19 bytes in this test case and the error of the second
read_log_event() is reported to the slave.

The second read_log_event() starts from position 94 (75 + 19) to 113
(75 + 19 + 19). Usually, there are two events in the binary log:

    . 0   - 3   - Header
    . 4   - 105 - Format Descriptor Event
    . 106 - 304 - Query Event

and both reads fail because operations are reading from invalid positions
as expected.

However, mysql_binlog_send() does not use the same IO_CACHE that is used to
write into binary log (i.e. mysql_bin_log.log_file) for the hot binary log.
It opens the binary log file directly by calling open_binlog() and creates a
separated IO_CACHE. So there is a possibly that after a master has flushed
the binary log file, the content has been cached by the filesystem, and has
not updated the disk file. If this happens, then a slave will only see part
of the file, and thus the second read_log_event() will report event truncated
error.

To fix the problem, if the first read_log_event() has failed, we ensure that
the second one will try to read from the same position.
2011-01-28 01:25:26 +00:00
..
binlog Fixed pb failure. 2010-12-20 10:07:35 +01:00
bugs BUG#49978: Replication tests don't clean up replication state at the end 2010-12-19 18:07:28 +01:00
engines Modifications in mysql-5.1 engines test suite. 2011-01-05 12:16:07 +05:30
federated Bug#35333, "If Federated table can't connect to remote host, can't retrieve 2010-11-29 22:46:43 -06:00
funcs_1 Test which runs slowly on some machines, is marked as big 2010-12-31 12:07:34 +01:00
funcs_2 merge 5.0-> 5.1 2009-04-24 13:00:17 -04:00
im
innodb Merge mysql-5.1-bugteam -> mysql-5.1-innodb 2010-12-27 19:21:21 +02:00
innodb_plugin Merge mysql-5.1-bugteam -> mysql-5.1-innodb 2010-12-27 19:21:21 +02:00
jp Bug : some tests in suite "jp" fail in embedded server (use LOAD DATA) 2009-09-11 15:52:08 +03:00
large_tests
manual BUG#49978: Replication tests don't clean up replication state at the end 2010-12-19 18:07:28 +01:00
ndb Bug#57924: crash when creating partitioned table with 2011-01-10 16:20:28 +01:00
ndb_team BUG#49978: Replication tests don't clean up replication state at the end 2010-12-19 18:07:28 +01:00
parts Bug#54483: valgrind errors when making warnings for multiline inserts into partition 2010-12-22 10:50:36 +01:00
rpl BUG#55675 rpl.rpl_log_pos fails sporadically with error binlog truncated in the middle 2011-01-28 01:25:26 +00:00
rpl_ndb BUG#49978: Replication tests don't clean up replication state at the end 2010-12-19 18:07:28 +01:00
stress Merge trift2.:/MySQL/M51/mysql-5.1 2008-02-22 16:14:27 +01:00
sys_vars Merge of results of the review done in 5.1-bugteam to 5.1. 2011-01-27 08:56:59 +01:00