Fixed XA recovery for InnoDB. Note that XA recovery is still disabled

until it has been comprehensive tested.


innobase/log/log0log.c:
  Added general documentation of InnoDB redo-logs.
innobase/trx/trx0roll.c:
  Prepared transactions are not rolled back in a recovery if
  innobase_force_recovery = 0. But they are rolled back if
  innobase_force_recovery > 0.
innobase/trx/trx0trx.c:
  Disable the XA code in InnoDB crash recovery until it has been
  comprehensive tested. SHOW INNODB STATUS now prints different
  output for prepared transactions.
innobase/trx/trx0undo.c:
  Do not unnecessary write X/Open XA XID. XID is written in the prepare.
  Space for a XID should be reserved at this stage.
sql/ha_innodb.cc:
  Remove error.
This commit is contained in:
unknown 2005-03-01 08:17:03 +02:00
commit ea24940fba
5 changed files with 58 additions and 25 deletions

View file

@ -435,14 +435,14 @@ trx_lists_init_at_db_start(void)
if (undo->state == TRX_UNDO_PREPARED) {
fprintf(stderr,
fprintf(stderr,
"InnoDB: Transaction %lu %lu was in the XA prepared state.\n",
ut_dulint_get_high(trx->id),
ut_dulint_get_low(trx->id));
/* trx->conc_state = TRX_PREPARED; */
trx->conc_state =
TRX_ACTIVE;
trx->conc_state = TRX_ACTIVE;
/* trx->conc_state = TRX_PREPARED;*/
} else {
trx->conc_state =
TRX_COMMITTED_IN_MEMORY;
@ -498,16 +498,15 @@ trx_lists_init_at_db_start(void)
commit or abort decision from MySQL */
if (undo->state == TRX_UNDO_PREPARED) {
fprintf(stderr,
fprintf(stderr,
"InnoDB: Transaction %lu %lu was in the XA prepared state.\n",
ut_dulint_get_high(trx->id),
ut_dulint_get_low(trx->id));
ut_dulint_get_high(trx->id),
ut_dulint_get_low(trx->id));
/* trx->conc_state = TRX_PREPARED; */
trx->conc_state =
TRX_ACTIVE;
trx->conc_state = TRX_ACTIVE;
/* trx->conc_state =
TRX_PREPARED; */
} else {
trx->conc_state =
TRX_COMMITTED_IN_MEMORY;
@ -1638,10 +1637,13 @@ trx_print(
fputs(", not started", f);
break;
case TRX_ACTIVE:
case TRX_PREPARED:
fprintf(f, ", ACTIVE %lu sec",
(ulong)difftime(time(NULL), trx->start_time));
break;
case TRX_PREPARED:
fprintf(f, ", ACTIVE (PREPARED) %lu sec",
(ulong)difftime(time(NULL), trx->start_time));
break;
case TRX_COMMITTED_IN_MEMORY:
fputs(", COMMITTED IN MEMORY", f);
break;
@ -1938,7 +1940,7 @@ trx_get_trx_by_xid(
if (xid->gtrid_length == trx->xid.gtrid_length &&
xid->bqual_length == trx->xid.bqual_length &&
memcmp(xid, &trx->xid,
memcmp(xid->data, trx->xid.data,
xid->gtrid_length +
xid->bqual_length) == 0) {
break;