mariadb/mysql-test/extra/binlog_tests
Alfranio Correia 678eb3d66f BUG#47287 RBR: replication diff on basic case with txn- and non-txn tables in a statement
Let
  - T be a transactional table and N non-transactional table.
  - B be begin, C commit and R rollback.
  - M be a mixed statement, i.e. a statement that updates both T and N.
  - M* be a mixed statement that fails while updating either T or N.

This patch restore the behavior presented in 5.1.37 for rows either produced in
the RBR or MIXED modes, when a M* statement that happened early in a transaction
had their changes written to the binary log outside the boundaries of the
transaction and wrapped in a BEGIN/ROLLBACK. This was done to keep the slave
consistent with with the master as the rollback would keep the changes on N and
undo them on T. In particular, we do what follows:

  . B M* T C would log - B M* R B T C.

Note that, we are not preserving history from the master as we are introducing a
rollback that never happened. However, this seems to be more acceptable than
making the slave diverge. We do not fix the following case:

  . B T M* C would log B T M* C.

The slave will diverge as the changes on T tables that originated from the M
statement are rolled back on the master but not on the slave. Unfortunately, we
cannot simply rollback the transaction as this would undo any uncommitted
changes on T tables.

SBR is not considered in this patch because a failing statement is written to
the binary along with the error code and a slave executes and then rolls back
the statement when it has an associated error code, thus undoing the effects
on T. In RBR and MBR, a full-fledged fix will be pushed after the WL 2687.
2009-10-06 01:38:58 +01:00
..
binlog.test Fix for bug#45998: database crashes when running 2009-07-14 20:07:29 +05:00
binlog_failure_mixing_engines.test BUG#47287 RBR: replication diff on basic case with txn- and non-txn tables in a statement 2009-10-06 01:38:58 +01:00
binlog_insert_delayed.test BUG#38068: binlog_stm_binlog fails sporadically in pushbuild 2008-07-23 18:56:39 +02:00
binlog_truncate.test Bug #36763 2009-02-06 17:06:41 +01:00
blackhole.test Merging 5.1 main into 5.1-rpl 2008-10-23 21:27:09 +02:00
ctype_cp932.test Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl 2008-02-20 19:49:26 +01:00
ctype_cp932_binlog.test Merge pilot.(none):/data/msvensson/mysql/bug28369/my50-bug28369 2007-06-07 19:19:29 +02:00
ctype_ucs_binlog.test WL#4189 2007-12-12 18:19:24 +01:00
database.test Bug#41888: Test binlog.binlog_database causing binlog_innodb to fail on Pushbuild. 2009-01-12 18:45:35 -05:00
drop_temp_table.test BUG #46572 DROP TEMPORARY table IF EXISTS does not have a consistent behavior in ROW mode 2009-09-28 10:23:06 +08:00
innodb_stat.test Bug#37312 Make tests binlog_row_innodb_stat and binlog_stm_innodb_stat more robust 2008-09-22 15:15:52 -04:00
insert_select-binlog.test Merge bk-internal:/home/bk/mysql-5.1-new-maint 2007-06-07 15:21:52 -07:00
mix_innodb_myisam_binlog.test Update paths 2008-03-03 10:17:32 +01:00
mix_innodb_myisam_side_effects.test Merge pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-rpl 2008-02-28 12:21:44 +01:00