Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-3291

LP #1468301: XA prepared transactions not properly recovered

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None

      Description

      **Reported in Launchpad by Laurynas Biveinis last update 24-06-2015 11:56:57

      trx_lists_init_at_db_start does not add a transaction descriptor for XA PREPAREd transactions that have update (and not insert) undo records. As an example, their implicit X locks are invisible to other transactions, there might be other detrimental effects too.

      This manifested as a failure of innodb.xa_recovery, which is a new upstream testcase in 5.5.44.

      Fix is

      diff --git a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c
      index 09f425c..7ed79d4 100644
      — a/storage/innobase/trx/trx0trx.c
      +++ b/storage/innobase/trx/trx0trx.c
      @@ -769,9 +769,9 @@ trx_lists_init_at_db_start(void)
      " anyway.\n");

      trx->state = TRX_ACTIVE;

      • trx_reserve_descriptor(
      • trx);
        }
        +
        + trx_reserve_descriptor(trx);
        } else {
        trx->state
        = TRX_COMMITTED_IN_MEMORY;

        Smart Checklist

          Attachments

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              lpjirasync lpjirasync (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: