diff options
author | Luis Soares <luis.soares@oracle.com> | 2010-09-24 10:44:53 +0100 |
---|---|---|
committer | Luis Soares <luis.soares@oracle.com> | 2010-09-24 10:44:53 +0100 |
commit | f17cc60413d38b4576f4fc287b2107daff801c34 (patch) | |
tree | cdfa97b221f1127cb222fedd3d491f0eb92b7554 /sql/rpl_rli.h | |
parent | 386d50478c20c863ccb78c81bdcb79bfeeb6089a (diff) | |
download | mariadb-git-f17cc60413d38b4576f4fc287b2107daff801c34.tar.gz |
BUG#55263: assert in check_binlog_magic
The procedure for setting up a fake binary log, by changing the
relay log files manually, is run twice when we issue mtr with
--repeat=2. However, when setting it up for the second time,
neither the sql thread is reset nor the server is restarted. This
means that previous stale relay log IO_CACHE metadata - from
first run - is left around. As a consequence, when the test is
run for the second time, the IO_CACHE for the relay log has
position in file different than zero, triggering the assertion.
We fix this by deploying a call to my_b_seek before calling
check_binlog_magic in next_event. This prevents the server
from asserting, in the cases that the SQL thread was reads
from a hot log (relay.NNNNN), then is stopped, then is restarted
from a previous cold log (relay.MMMMM), and then it reaches
the hot log relay.NNNNN again, in which case, the read
coordinates are not set to zero, but to the old values.
Additionally, some comments to the source code were added.
Diffstat (limited to 'sql/rpl_rli.h')
-rw-r--r-- | sql/rpl_rli.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/rpl_rli.h b/sql/rpl_rli.h index 87516c366fb..69988fe5995 100644 --- a/sql/rpl_rli.h +++ b/sql/rpl_rli.h @@ -94,6 +94,16 @@ public: */ MYSQL_BIN_LOG relay_log; LOG_INFO linfo; + + /* + cur_log + Pointer that either points at relay_log.get_log_file() or + &rli->cache_buf, depending on whether the log is hot or there was + the need to open a cold relay_log. + + cache_buf + IO_CACHE used when opening cold relay logs. + */ IO_CACHE cache_buf,*cur_log; /* The following variables are safe to read any time */ |