summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorTeemu Ollakka <teemu.ollakka@galeracluster.com>2019-01-24 17:37:45 +0200
committerTeemu Ollakka <teemu.ollakka@galeracluster.com>2019-01-27 15:36:36 +0200
commit4ea128391b964fbad5b58629bdee980bbedbd228 (patch)
treeaaf0f0109ad65a5db0f1561d101a0d717169ce6e /sql/handler.cc
parent040b840de7bcd32b0236531a7aec95b11341cef3 (diff)
downloadmariadb-git-4ea128391b964fbad5b58629bdee980bbedbd228.tar.gz
MDEV-15740 Fix wsrep recovery with wsrep_emulate_bin_log
If the TC log did not provide list of XIDs to recover, the commit by XID was skipped during wsrep recovery if binlog emulation was on. However, with wsrep we want to commit every prepared transaction with assigned wsrep XID since the transaction has already been committed in the cluster. Added a special condition to always proceed to commit by XID in xarecover_handlerton() if binlog is off and the recovered transaction has wsrep XID.
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index e2a8d16b723..a9688fb96b4 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -1921,7 +1921,10 @@ static my_bool xarecover_handlerton(THD *unused, plugin_ref plugin,
info->found_foreign_xids++;
continue;
}
- if (info->dry_run)
+ if (IF_WSREP(!(wsrep_emulate_bin_log &&
+ wsrep_is_wsrep_xid(info->list + i) &&
+ x <= wsrep_limit) && info->dry_run,
+ info->dry_run))
{
info->found_my_xids++;
continue;