summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/log.cc b/sql/log.cc
index 4572b9cca82..61e9ddfda6f 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -1801,6 +1801,7 @@ int binlog_init(void *p)
binlog_hton->prepare= binlog_prepare;
binlog_hton->start_consistent_snapshot= binlog_start_consistent_snapshot;
}
+
binlog_hton->flags= HTON_NOT_USER_SELECTABLE | HTON_HIDDEN | HTON_NO_ROLLBACK;
return 0;
}
@@ -2119,7 +2120,9 @@ int binlog_commit_by_xid(handlerton *hton, XID *xid)
THD *thd= current_thd;
if (thd->is_current_stmt_binlog_disabled())
- return 0;
+ {
+ return thd->wait_for_prior_commit();
+ }
/* the asserted state can't be reachable with xa commit */
DBUG_ASSERT(!thd->get_stmt_da()->is_error() ||
@@ -2151,7 +2154,9 @@ int binlog_rollback_by_xid(handlerton *hton, XID *xid)
THD *thd= current_thd;
if (thd->is_current_stmt_binlog_disabled())
- return 0;
+ {
+ return thd->wait_for_prior_commit();
+ }
if (thd->get_stmt_da()->is_error() &&
thd->get_stmt_da()->sql_errno() == ER_XA_RBROLLBACK)