summaryrefslogtreecommitdiff
path: root/innobase/trx/trx0trx.c
diff options
context:
space:
mode:
authorunknown <jan@hundin.mysql.fi>2004-12-01 09:20:32 +0200
committerunknown <jan@hundin.mysql.fi>2004-12-01 09:20:32 +0200
commit843f38fc780e2aae7017c5696f025e7afb9adca3 (patch)
tree48e808442675c1b10109d7f02d3521fbdfb2e4cd /innobase/trx/trx0trx.c
parent739b630ed7c1a832ff4e8075cd8739c93286e61f (diff)
downloadmariadb-git-843f38fc780e2aae7017c5696f025e7afb9adca3.tar.gz
This is a code cleanup patch for X/Open XA.
BitKeeper/deleted/.del-xa.h~4021d7e61ff515b: Delete: innobase/include/xa.h innobase/include/trx0trx.h: Change xa.h to trx0ha.h. innobase/include/trx0undo.h: Split TRX_UNDO_DICT_OPERATION field to two fiels: first contains TRX_UNDO_XID_EXISTS flag which is TRUE if log header contains X/Open XA XID and the second one contains TRX_UNDO_DICT_TRANS flag which is TRUE if the transaction is dictionary transaction. innobase/trx/trx0trx.c: Remove unnecessary and erroneus code from prepare. Add some informative printouts of prepared transactions. innobase/trx/trx0undo.c: Split TRX_UNDO_DICT_OPERATION field to two fields: the first field is TRX_UNDO_XID_EXISTS flag which is true if the log header contains X/Open XA XID and the second field is TRX_UNDO_DICT_TRANS flag which is true if the transaction was a dictionary transaction. sql/ha_innodb.cc: Code cleanup.
Diffstat (limited to 'innobase/trx/trx0trx.c')
-rw-r--r--innobase/trx/trx0trx.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c
index d7daecdb5b7..ab8bd898dd6 100644
--- a/innobase/trx/trx0trx.c
+++ b/innobase/trx/trx0trx.c
@@ -24,7 +24,7 @@ Created 3/26/1996 Heikki Tuuri
#include "thr0loc.h"
#include "btr0sea.h"
#include "os0proc.h"
-#include "xa.h"
+#include "trx0xa.h"
/* Copy of the prototype for innobase_mysql_print_thd: this
copy MUST be equal to the one in mysql/sql/ha_innodb.cc ! */
@@ -1740,10 +1740,6 @@ trx_prepare_off_kernel(
undo = trx->update_undo;
if (undo) {
- mutex_enter(&kernel_mutex);
- trx->no = trx_sys_get_new_trx_no();
-
- mutex_exit(&kernel_mutex);
/* It is not necessary to obtain trx->undo_mutex here
because only a single OS thread is allowed to do the
@@ -1781,11 +1777,6 @@ trx_prepare_off_kernel(
mutex_exit(&kernel_mutex);
- if (trx->insert_undo != NULL) {
-
- trx_undo_insert_cleanup(trx);
- }
-
/* Write the log to the log files AND flush them to disk */
/*-------------------------------------*/
@@ -1860,9 +1851,19 @@ trx_recover_for_mysql(
while (trx) {
if (trx->conc_state == TRX_PREPARED) {
xid_list[num_of_transactions] = trx->xid;
+
+ fprintf(stderr,
+"InnoDB: Transaction %lu %lu in prepared state after recovery\n",
+ (ulong) ut_dulint_get_high(trx->id),
+ (ulong) ut_dulint_get_low(trx->id));
+
+ fprintf(stderr,
+"InnoDB: Transaction contains changes to %lu rows\n",
+ (ulong)ut_conv_dulint_to_longlong(trx->undo_no));
+
num_of_transactions++;
- if ( (uint)num_of_transactions == len ) {
+ if ((uint)num_of_transactions == len ) {
break;
}
}