diff options
author | unknown <Dao-Gang.Qu@sun.com> | 2009-10-14 09:39:05 +0800 |
---|---|---|
committer | unknown <Dao-Gang.Qu@sun.com> | 2009-10-14 09:39:05 +0800 |
commit | f9c6730258a9f5776608967fcc1f10183710c76f (patch) | |
tree | e6614a71219b99d66068dcb6d5cf7ab23c031151 /sql/sql_select.cc | |
parent | 610213149cc4cd00f402387d9f687e6375956d15 (diff) | |
download | mariadb-git-f9c6730258a9f5776608967fcc1f10183710c76f.tar.gz |
Bug#46640: output from mysqlbinlog command in 5.1 breaks replication
The BINLOG statement was sharing too much code with the slave SQL thread, introduced with
the patch for Bug#32407. This caused statements to be logged with the wrong server_id, the
id stored inside the events of the BINLOG statement rather than the id of the running
server.
Fix by rearranging code a bit so that only relevant parts of the code are executed by
the BINLOG statement, and the server_id of the server executing the statements will
not be overrided by the server_id stored in the 'format description BINLOG statement'.
mysql-test/extra/binlog_tests/binlog.test:
Added test to verify if the server_id stored in the 'format
description BINLOG statement' will override the server_id
of the server executing the statements.
mysql-test/suite/binlog/r/binlog_row_binlog.result:
Test result for bug#46640
mysql-test/suite/binlog/r/binlog_stm_binlog.result:
Test result for bug#46640
sql/log_event.cc:
Moved rows_event_stmt_clean() call from update_pos() to apply_event(). This in any case
makes more sense, and is needed as update_pos() is no longer called when executing
BINLOG statements.
Moved setting of rli->relay_log.description_event_for_exec from
Format_description_log_event::do_update_pos() to
Format_description_log_event::do_apply_event()
sql/log_event_old.cc:
Moved rows_event_stmt_clean() call from update_pos() to apply_event(). This in any case
makes more sense, and is needed as update_pos() is no longer called when executing
BINLOG statements.
sql/slave.cc:
The skip flag is no longer needed, as the code path for BINLOG statement has been
cleaned up.
sql/sql_binlog.cc:
Don't invoke the update_pos() code path for the BINLOG statement, as it contains code
that is redundant and/or harmful (especially setting thd->server_id).
Diffstat (limited to 'sql/sql_select.cc')
0 files changed, 0 insertions, 0 deletions