mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
f9c6730258
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). |
||
---|---|---|
.. | ||
binlog_auto_increment_bug33029.result | ||
binlog_base64_flag.result | ||
binlog_database.result | ||
binlog_grant.result | ||
binlog_incident.result | ||
binlog_index.result | ||
binlog_innodb.result | ||
binlog_innodb_row.result | ||
binlog_killed.result | ||
binlog_killed_simulate.result | ||
binlog_mix_innodb_stat.result | ||
binlog_mixed_failure_mixing_engines.result | ||
binlog_multi_engine.result | ||
binlog_old_versions.result | ||
binlog_row_binlog.result | ||
binlog_row_ctype_cp932.result | ||
binlog_row_ctype_ucs.result | ||
binlog_row_drop_tmp_tbl.result | ||
binlog_row_failure_mixing_engines.result | ||
binlog_row_innodb_stat.result | ||
binlog_row_insert_select.result | ||
binlog_row_mix_innodb_myisam.result | ||
binlog_row_mysqlbinlog_db_filter.result | ||
binlog_row_mysqlbinlog_verbose.result | ||
binlog_sql_mode.result | ||
binlog_start_comment.result | ||
binlog_statement_insert_delayed.result | ||
binlog_stm_binlog.result | ||
binlog_stm_blackhole.result | ||
binlog_stm_ctype_cp932.result | ||
binlog_stm_ctype_ucs.result | ||
binlog_stm_drop_tmp_tbl.result | ||
binlog_stm_innodb_stat.result | ||
binlog_stm_insert_select.result | ||
binlog_stm_mix_innodb_myisam.result | ||
binlog_stm_ps.result | ||
binlog_stm_row.result | ||
binlog_stm_unsafe_warning.result | ||
binlog_tbl_metadata.result | ||
binlog_tmp_table.result | ||
binlog_truncate_innodb.result | ||
binlog_truncate_myisam.result | ||
binlog_unsafe.result |