XA prepared transactions not properly recovered

Bug #1468301 reported by Laurynas Biveinis
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: xtradb
tags: added: xtradb
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

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  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.