#At file:///home/marko/innobase/dev/mysql2a/5.6-innodb/ based on revid:marko.makela@strippedyqs8fs3610ch
3440 Marko Mäkelä 2011-01-19
Fix an error introduced in r3439.
trx_commit_for_mysql(): Replace the trx_start_if_not_started_xa() call
with a check of trx->state.
modified:
storage/innobase/trx/trx0trx.c
=== modified file 'storage/innobase/trx/trx0trx.c'
--- a/storage/innobase/trx/trx0trx.c revid:marko.makela@stripped3610ch
+++ b/storage/innobase/trx/trx0trx.c revid:marko.makela@stripped
@@ -1044,8 +1044,29 @@ trx_commit_for_mysql(
ut_a(trx);
- trx_start_if_not_started_xa(trx);
+ switch (trx->state) {
+ case TRX_STATE_NOT_STARTED:
+ /* Update the info whether we should skip XA steps that eat
+ CPU time.
+ For the duration of the transaction trx->support_xa is
+ not reread from thd so any changes in the value take
+ effect in the next transaction. This is to avoid a
+ scenario where some undo log records generated by a
+ transaction contain XA information and other undo log
+ records, generated by the same transaction do not. */
+ trx->support_xa = thd_supports_xa(trx->mysql_thd);
+
+ trx_start_low(trx);
+ /* fall through */
+ case TRX_STATE_ACTIVE:
+ case TRX_STATE_PREPARED:
+ goto state_ok;
+ case TRX_STATE_COMMITTED_IN_MEMORY:
+ break;
+ }
+ ut_error;
+state_ok:
trx->op_info = "committing";
trx_commit(trx);
Attachment: [text/bzr-bundle] bzr/marko.makela@oracle.com-20110119112245-e0zpbgirk1c4t6d3.bundle
| Thread |
|---|
| • bzr commit into mysql-trunk-innodb branch (marko.makela:3440) | marko.makela | 19 Jan |