summaryrefslogtreecommitdiff
path: root/sql/wsrep_hton.cc
diff options
context:
space:
mode:
authorSeppo Jaakola <seppo.jaakola@codership.com>2013-11-26 17:03:14 +0200
committerSeppo Jaakola <seppo.jaakola@codership.com>2013-11-26 17:03:14 +0200
commit4a11e84414292e852a0968ef871dc90cbd24ae30 (patch)
tree65aa016763e86cc8a3675b862a02416f45251db5 /sql/wsrep_hton.cc
parenta2594e96f7c7fe762a8165916551ae96bcbb869f (diff)
downloadmariadb-git-4a11e84414292e852a0968ef871dc90cbd24ae30.tar.gz
merge from lp:codership-mysql/5.5 rev #3895
Diffstat (limited to 'sql/wsrep_hton.cc')
-rw-r--r--sql/wsrep_hton.cc21
1 files changed, 12 insertions, 9 deletions
diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc
index d43e5408f61..d27d8b95b13 100644
--- a/sql/wsrep_hton.cc
+++ b/sql/wsrep_hton.cc
@@ -70,19 +70,22 @@ handlerton *wsrep_hton;
void wsrep_register_hton(THD* thd, bool all)
{
- THD_TRANS *trans=all ? &thd->transaction.all : &thd->transaction.stmt;
- for (Ha_trx_info *i= trans->ha_list; WSREP(thd) && i; i = i->next())
+ if (thd->wsrep_exec_mode == LOCAL_STATE)
{
- if (i->ht()->db_type == DB_TYPE_INNODB)
+ THD_TRANS *trans=all ? &thd->transaction.all : &thd->transaction.stmt;
+ for (Ha_trx_info *i= trans->ha_list; WSREP(thd) && i; i = i->next())
{
- trans_register_ha(thd, all, wsrep_hton);
-
- /* follow innodb read/write settting */
- if (i->is_trx_read_write())
+ if (i->ht()->db_type == DB_TYPE_INNODB)
{
- thd->ha_data[wsrep_hton->slot].ha_info[all].set_trx_read_write();
+ trans_register_ha(thd, all, wsrep_hton);
+
+ /* follow innodb read/write settting */
+ if (i->is_trx_read_write())
+ {
+ thd->ha_data[wsrep_hton->slot].ha_info[all].set_trx_read_write();
+ }
+ break;
}
- break;
}
}
}