XA prepared transactions not properly recovered

Bug #1468301 reported by Laurynas Biveinis on 2015-06-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Invalid
Undecided
Unassigned
5.1
Invalid
Undecided
Unassigned
5.5
Fix Released
Medium
Laurynas Biveinis
5.6
Invalid
Undecided
Unassigned

Bug Description

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;

tags: added: xtradb

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-3291

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related blueprints