MDEV-11934: MariaRocks: Group Commit with binlog

Fix a failure in rocksdb_rpl.rpl_rocksdb_2pc_crash_recover test.
Don't do XA with binlog if @@rocksdb_enable_2pc=OFF.
This commit is contained in:
Sergei Petrunia 2017-10-23 09:45:47 +00:00
parent 4995091c33
commit d577b1a9c2

View file

@ -3088,6 +3088,16 @@ static void rocksdb_commit_ordered(handlerton *hton, THD* thd, bool all)
DBUG_ASSERT(all || (!thd_test_options(thd, OPTION_NOT_AUTOCOMMIT |
OPTION_BEGIN)));
Rdb_transaction *&tx = get_tx_from_thd(thd);
if (!tx->is_two_phase()) {
/*
ordered_commit is supposedly slower as it is done sequentially
in order to preserve commit order.
if we are not required do 2-phase commit with the binlog, do not do
anything here.
*/
return;
}
tx->set_sync(false);