lp:~laurynas-biveinis/percona-server/fake-changes-binlog-5.1

Created by Laurynas Biveinis on 2013-06-20 and last modified on 2013-08-22
Get this branch:
bzr branch lp:~laurynas-biveinis/percona-server/fake-changes-binlog-5.1
Only Laurynas Biveinis can upload to this branch. If you are Laurynas Biveinis please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Recent revisions

578. By Laurynas Biveinis on 2013-08-22

Fix

- bug 1190580 (Fake changes transactions are binlogged) and
- bug 1188162 (Verify in MTR that fake changes transactions are not
  binlogged).

Fixed bug 1188162 by adding a testcase
binlog_percona_fake_changes.test that executes a fake changes workload
and checks that no binlog events have resulted from this. The
testcase is adopted from a similar testcase in Facebook patch
rpl_percona_fake_changes.test with the difference that we check the
binlog only instead of setting up replication.

This testcase then immediatelly fails showing that fake changes
transactions are binlogged (bug 1190580). This is fixed by the
following.
- Adjusting innobase_xa_prepare() to return early with
  HA_ERR_WRONG_COMMAND instead of 0 (success) if fake changes are
  enabled and the function was called for a COMMIT statement or a DML
  statement with autocommit=1. Also clear the diagnostic area. Keep
  on returning success if innobase_xa_prepare() is called for
  individual statements in a multi-statement tranaction. This causes
  ha_commit_trans() not to write the transaction to binlog if fake
  changes are enabled and 2PC between the storage engines and binlog
  is used.
- Instead of skipping the 2PC prepare step for handlertons that are
  not marked as read-write, skip it only for handlertons that are not
  marked as read-write and have not fake changes enabled. The fake
  changes handlertons are never marked as read-write, which causes
  prepare to be skipped for them, making it impossible for its
  non-success return to do anything.
- Related to above, 2PC is only used if the total number of read-write
  handlertons in the transaction is at least two. Since fake changes
  handlertons do not contribute to this number, adjust
  ha_check_and_coalesce_trx_read_only() to consider fake changes
  handlertons to be read-write.
- To support the above, add a new function pointer is_fake_change to
  the handlerton struct. This is also done by the Facebook patch.

577. By Laurynas Biveinis on 2013-06-26

Merge lp:~gl-az/percona-server/ST-31919-5.1 again to fix the previous merge of the same branch

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:percona-server/5.6
This branch contains Public information 
Everyone can see this information.