summaryrefslogtreecommitdiff
path: root/innobase/trx
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2005-02-22 16:18:34 +0200
committerunknown <heikki@hundin.mysql.fi>2005-02-22 16:18:34 +0200
commit10ffa887f0123fd45e853c38dbc9cc88071954d3 (patch)
treebaaaf8ed45de7621532c7523f305533da1beb08b /innobase/trx
parentacaa20e21e5c086b2a1b375f4145bec52435482d (diff)
downloadmariadb-git-10ffa887f0123fd45e853c38dbc9cc88071954d3.tar.gz
trx0trx.c:
Disable the XA code in InnoDB crash recovery; when Jan and Sergei want to test XA, they should revert this patch innobase/trx/trx0trx.c: Disable the XA code in crash recovery; when Jan and Sergei want to test XA, they should revert this patch
Diffstat (limited to 'innobase/trx')
-rw-r--r--innobase/trx/trx0trx.c34
1 files changed, 29 insertions, 5 deletions
diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c
index 69415beb331..40e12f206dc 100644
--- a/innobase/trx/trx0trx.c
+++ b/innobase/trx/trx0trx.c
@@ -434,9 +434,21 @@ trx_lists_init_at_db_start(void)
commit or abort decision from MySQL */
if (undo->state == TRX_UNDO_PREPARED) {
- trx->conc_state = TRX_PREPARED;
+
+ fprintf(stderr,
+"InnoDB: Transaction %lu %lu was in the XA prepared state. We change it to\n"
+"InnoDB: the 'active' state, so that InnoDB's true-and-tested crash\n"
+"InnoDB: recovery will roll it back. If mysqld refuses to start after\n"
+"InnoDB: this, you may be able to resolve the problem by moving the binlog\n"
+"InnoDB: files to a safe place, and deleting all binlog files and the binlog\n"
+"InnoDB: .index file from the datadir.\n", ut_dulint_get_high(trx->id),
+ ut_dulint_get_low(trx->id));
+
+ /* trx->conc_state = TRX_PREPARED; */
+ trx->conc_state =
+ TRX_ACTIVE;
} else {
- trx->conc_state =
+ trx->conc_state =
TRX_COMMITTED_IN_MEMORY;
}
@@ -490,11 +502,23 @@ trx_lists_init_at_db_start(void)
commit or abort decision from MySQL */
if (undo->state == TRX_UNDO_PREPARED) {
- trx->conc_state =
- TRX_PREPARED;
+
+ fprintf(stderr,
+"InnoDB: Transaction %lu %lu was in the XA prepared state. We change it to\n"
+"InnoDB: the 'active' state, so that InnoDB's true-and-tested crash\n"
+"InnoDB: recovery will roll it back. If mysqld refuses to start after\n"
+"InnoDB: this, you may be able to resolve the problem by moving the binlog\n"
+"InnoDB: files to a safe place, and deleting all binlog files and the binlog\n"
+"InnoDB: .index file from the datadir.\n", ut_dulint_get_high(trx->id),
+ ut_dulint_get_low(trx->id));
+
+ /* trx->conc_state = TRX_PREPARED; */
+ trx->conc_state =
+ TRX_ACTIVE;
+
} else {
trx->conc_state =
- TRX_COMMITTED_IN_MEMORY;
+ TRX_COMMITTED_IN_MEMORY;
}
/* We give a dummy value for the trx