lp:~laurynas-biveinis/percona-server/fake-changes-binlog-5.1
- Get this branch:
- bzr branch lp:~laurynas-biveinis/percona-server/fake-changes-binlog-5.1
Branch merges
- Alexey Kopytov (community): Approve
- Vlad Lesin: Pending (g2) requested
-
Diff: 309 lines (+238/-2)5 files modifiedPercona-Server/mysql-test/suite/binlog/r/binlog_percona_fake_changes.result (+72/-0)
Percona-Server/mysql-test/suite/binlog/t/binlog_percona_fake_changes.test (+106/-0)
Percona-Server/sql/handler.cc (+20/-1)
Percona-Server/sql/handler.h (+1/-0)
Percona-Server/storage/innodb_plugin/handler/ha_innodb.cc (+39/-1)
Related bugs
Bug #1188162: Verify in MTR that fake changes transactions are not binlogged | Wishlist | Fix Released |
|
Bug #1190580: Fake changes transactions are binlogged | High | Fix Released |
|
Related blueprints
Branch information
- Owner:
- Laurynas Biveinis
- Status:
- Merged
Recent revisions
- 578. By Laurynas Biveinis
-
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
-
Merge lp:~gl-az/percona-server/ST-31919-5.1 again to fix the previous merge of the same branch
- 571. By <email address hidden>
-
Merge lp:~hrvojem/percona-server/rn-5.1.69-14.7-gca-trunk-5.1
http://jenkins. percona. com/job/ merge-PS- 5.1-docs- kickoff/ 20/
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