summaryrefslogtreecommitdiff
path: root/sql/wsrep_hton.cc
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2016-08-25 15:39:39 -0400
committerNirbhay Choubey <nirbhay@mariadb.com>2016-08-25 15:39:39 -0400
commit90266e8a0eb46867c990930fa4d305d2424929ba (patch)
tree787918cf537c678ab4f7a949520c847fa3fd8442 /sql/wsrep_hton.cc
parentdfa3046db48d8439cf3eb02ba6623fe2f6e44f91 (diff)
parentb506d9527b4303b91f69fe6b6f21f911e5bfef72 (diff)
downloadmariadb-git-90266e8a0eb46867c990930fa4d305d2424929ba.tar.gz
Merge branch '10.0-galera' into bb-10.1-serg
Diffstat (limited to 'sql/wsrep_hton.cc')
-rw-r--r--sql/wsrep_hton.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc
index 3bce8ba7128..6e0fc11bfda 100644
--- a/sql/wsrep_hton.cc
+++ b/sql/wsrep_hton.cc
@@ -34,11 +34,14 @@ extern "C" int thd_binlog_format(const MYSQL_THD thd);
*/
void wsrep_cleanup_transaction(THD *thd)
{
+ if (!WSREP(thd)) return;
+
if (wsrep_emulate_bin_log) thd_binlog_trx_reset(thd);
thd->wsrep_ws_handle.trx_id= WSREP_UNDEFINED_TRX_ID;
thd->wsrep_trx_meta.gtid= WSREP_GTID_UNDEFINED;
thd->wsrep_trx_meta.depends_on= WSREP_SEQNO_UNDEFINED;
thd->wsrep_exec_mode= LOCAL_STATE;
+ thd->wsrep_affected_rows= 0;
return;
}
@@ -109,13 +112,7 @@ void wsrep_register_hton(THD* thd, bool all)
*/
void wsrep_post_commit(THD* thd, bool all)
{
- /*
- TODO: It can perhaps be fixed in a more elegant fashion by turning off
- wsrep_emulate_binlog if wsrep_on=0 on server start.
- https://github.com/codership/mysql-wsrep/issues/112
- */
- if (!WSREP_ON)
- return;
+ if (!WSREP(thd)) return;
switch (thd->wsrep_exec_mode)
{