Commit a586a909 authored by heikki's avatar heikki

Merge r1048:1050 from branches/5.0:

trx_rollback_for_mysql(): Fix the comment introduced in r1046.

trx_commit_for_mysql(): Use the dummy trx->sess also for committing a prepared
transaction in XA recovery, just in case our code would need the session
object also in that case (does not seem to need it right now).
parent 9d69ac3d
......@@ -133,7 +133,7 @@ trx_rollback_for_mysql(
/* If we are doing the XA recovery of prepared transactions, then
the transaction object does not have an InnoDB session object, and we
must use a dummy session to get our rollback code to work. */
set a dummy session that we use for all MySQL transactions. */
if (trx->sess == NULL) {
/* Open a dummy session */
......
......@@ -1598,6 +1598,20 @@ trx_commit_for_mysql(
trx->op_info = "committing";
/* If we are doing the XA recovery of prepared transactions, then
the transaction object does not have an InnoDB session object, and we
set the dummy session that we use for all MySQL transactions. */
if (trx->sess == NULL) {
/* Open a dummy session */
if (!trx_dummy_sess) {
trx_dummy_sess = sess_open();
}
trx->sess = trx_dummy_sess;
}
trx_start_if_not_started(trx);
mutex_enter(&kernel_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment