mariadb/mysql-test/suite/binlog/r
unknown f9c6730258 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).
2009-10-14 09:39:05 +08:00
..
binlog_auto_increment_bug33029.result Bug #40559 assertion failed in check_binlog_magic 2009-03-06 20:19:29 +02:00
binlog_base64_flag.result merged 5.1 main to 5.1-rpl 2008-08-04 07:04:47 +02:00
binlog_database.result Merge BUG#43263 from 5.0-bugteam to 5.1-bugteam 2009-05-31 13:44:41 +08:00
binlog_grant.result Bug #39106: 2008-09-09 12:19:31 +02:00
binlog_incident.result Bug#46010 main.ctype_gbk_binlog fails sporadically : Table 't2' already exists 2009-09-07 13:42:54 +08:00
binlog_index.result merge: 5.1 -> 5.1-rpl 2009-01-23 13:22:05 +01:00
binlog_innodb.result Merge BUG#43263 from 5.0-bugteam to 5.1-bugteam 2009-05-31 13:44:41 +08:00
binlog_innodb_row.result Merge BUG#43263 from 5.0-bugteam to 5.1-bugteam 2009-05-31 13:44:41 +08:00
binlog_killed.result Merge koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug27571_asyn_killed_flags 2007-11-06 20:41:06 +02:00
binlog_killed_simulate.result Bug#43746: YACC return wrong query string when parse 'load data infile' sql statement 2009-09-28 05:41:10 -07:00
binlog_mix_innodb_stat.result Bug#37312 Make tests binlog_row_innodb_stat and binlog_stm_innodb_stat more robust 2008-09-22 15:15:52 -04:00
binlog_mixed_failure_mixing_engines.result BUG#47678 Changes to n-tables that happen early in a trans. are only flushed upon commit 2009-10-06 01:54:00 +01:00
binlog_multi_engine.result Merge BUG#43263 from 5.0-bugteam to 5.1-bugteam 2009-05-31 13:44:41 +08:00
binlog_old_versions.result BUG#34141: mysqlbinlog cannot read 4.1 binlogs containing load data infile 2008-01-30 14:12:40 +01:00
binlog_row_binlog.result Bug#46640: output from mysqlbinlog command in 5.1 breaks replication 2009-10-14 09:39:05 +08:00
binlog_row_ctype_cp932.result Merge stella.local:/home2/mydev/mysql-5.1-amain 2008-03-26 10:27:00 +01:00
binlog_row_ctype_ucs.result Merge BUG#43263 from 5.0-bugteam to 5.1-bugteam 2009-05-31 13:44:41 +08:00
binlog_row_drop_tmp_tbl.result BUG #46572 DROP TEMPORARY table IF EXISTS does not have a consistent behavior in ROW mode 2009-09-28 10:23:06 +08:00
binlog_row_failure_mixing_engines.result BUG#47678 Changes to n-tables that happen early in a trans. are only flushed upon commit 2009-10-06 01:54:00 +01:00
binlog_row_innodb_stat.result Bug#37312 Make tests binlog_row_innodb_stat and binlog_stm_innodb_stat more robust 2008-09-22 15:15:52 -04:00
binlog_row_insert_select.result Merge BUG#43263 from 5.0-bugteam to 5.1-bugteam 2009-05-31 13:44:41 +08:00
binlog_row_mix_innodb_myisam.result mysql-5.1-bugteam (local) --> mysql-5.1-bugteam 2009-10-06 11:25:36 +01:00
binlog_row_mysqlbinlog_db_filter.result BUG#42941: --database paramater to mysqlbinlog fails with RBR 2009-06-07 23:28:08 +01:00
binlog_row_mysqlbinlog_verbose.result Bug#47323 : mysqlbinlog --verbose displays bad output when events contain subset of columns 2009-10-09 16:54:48 +08:00
binlog_sql_mode.result BUG#39526 sql_mode not retained in binary log for CREATE PROCEDURE 2009-02-28 09:35:18 +08:00
binlog_start_comment.result Fix after merge 2008-02-28 18:55:46 +01:00
binlog_statement_insert_delayed.result BUG#38068: binlog_stm_binlog fails sporadically in pushbuild 2008-07-29 17:36:13 +02:00
binlog_stm_binlog.result Bug#46640: output from mysqlbinlog command in 5.1 breaks replication 2009-10-14 09:39:05 +08:00
binlog_stm_blackhole.result Bug#43746: YACC return wrong query string when parse 'load data infile' sql statement 2009-09-28 05:41:10 -07:00
binlog_stm_ctype_cp932.result Merge stella.local:/home2/mydev/mysql-5.1-amain 2008-03-26 10:27:00 +01:00
binlog_stm_ctype_ucs.result BUG#34541: mysqlbinlog prints 'set;' in stm mode after changing autocommit mode 2008-04-02 16:49:22 +07:00
binlog_stm_drop_tmp_tbl.result BUG #46572 DROP TEMPORARY table IF EXISTS does not have a consistent behavior in ROW mode 2009-09-28 10:23:06 +08:00
binlog_stm_innodb_stat.result Bug#37312 Make tests binlog_row_innodb_stat and binlog_stm_innodb_stat more robust 2008-09-22 15:15:52 -04:00
binlog_stm_insert_select.result
binlog_stm_mix_innodb_myisam.result Bug#43746: YACC return wrong query string when parse 'load data infile' sql statement 2009-09-28 05:41:10 -07:00
binlog_stm_ps.result Post fix of result file after push of BUG#42415 2009-05-20 18:28:43 +08:00
binlog_stm_row.result Merge BUG#43263 from 5.0-bugteam to 5.1-bugteam 2009-05-31 13:44:41 +08:00
binlog_stm_unsafe_warning.result Bug#46265: Can not disable warning about unsafe statements for binary logging 2009-07-31 10:00:35 -03:00
binlog_tbl_metadata.result BUG#42749: infinite loop writing to row based binlog - processlist shows 2009-05-12 12:53:46 +01:00
binlog_tmp_table.result Bug#46010 main.ctype_gbk_binlog fails sporadically : Table 't2' already exists 2009-09-07 13:42:54 +08:00
binlog_truncate_innodb.result Bug #36763 2009-02-06 17:06:41 +01:00
binlog_truncate_myisam.result Bug #36763 2009-02-10 22:26:37 +01:00
binlog_unsafe.result Post fix of result file after push of BUG#42415 2009-05-20 18:28:43 +08:00