From 7ae16135b92808d319e2168fb443e4dbe38c4c10 Mon Sep 17 00:00:00 2001 From: marko Date: Thu, 8 Mar 2007 10:10:28 +0000 Subject: [PATCH] Rename the Boolean field trx->type to trx->is_purge and remove the constants TRX_USER and TRX_PURGE. --- include/trx0trx.h | 8 +------- trx/trx0purge.c | 2 +- trx/trx0trx.c | 6 +++--- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/include/trx0trx.h b/include/trx0trx.h index cd483932b70..fe36b0d1a01 100644 --- a/include/trx0trx.h +++ b/include/trx0trx.h @@ -402,7 +402,7 @@ struct trx_struct{ const char* op_info; /* English text describing the current operation, or an empty string */ - ulint type; /* TRX_USER, TRX_PURGE */ + unsigned is_purge:1; /* 0=user transaction, 1=purge */ ulint conc_state; /* state of the trx from the point of view of concurrency control: TRX_ACTIVE, TRX_COMMITTED_IN_MEMORY, @@ -673,12 +673,6 @@ struct trx_struct{ single operation of a transaction, e.g., a parallel query */ -/* Transaction types */ -#define TRX_USER 1 /* normal user transaction */ -#define TRX_PURGE 2 /* purge transaction: this is not - inserted to the trx list of trx_sys - and no rollback segment is assigned to - this */ /* Transaction concurrency states */ #define TRX_NOT_STARTED 1 #define TRX_ACTIVE 2 diff --git a/trx/trx0purge.c b/trx/trx0purge.c index 25519a09a1d..f0e85ef1604 100644 --- a/trx/trx0purge.c +++ b/trx/trx0purge.c @@ -221,7 +221,7 @@ trx_purge_sys_create(void) purge_sys->trx = purge_sys->sess->trx; - purge_sys->trx->type = TRX_PURGE; + purge_sys->trx->is_purge = 1; ut_a(trx_start_low(purge_sys->trx, ULINT_UNDEFINED)); diff --git a/trx/trx0trx.c b/trx/trx0trx.c index 698db282d56..cdea3e9c477 100644 --- a/trx/trx0trx.c +++ b/trx/trx0trx.c @@ -109,7 +109,7 @@ trx_create( trx->op_info = ""; - trx->type = TRX_USER; + trx->is_purge = 0; trx->conc_state = TRX_NOT_STARTED; trx->start_time = time(NULL); @@ -667,7 +667,7 @@ trx_start_low( ut_ad(mutex_own(&kernel_mutex)); ut_ad(trx->rseg == NULL); - if (trx->type == TRX_PURGE) { + if (trx->is_purge) { trx->id = ut_dulint_zero; trx->conc_state = TRX_ACTIVE; trx->start_time = time(NULL); @@ -1708,7 +1708,7 @@ trx_print( fputs(trx->op_info, f); } - if (trx->type != TRX_USER) { + if (trx->is_purge) { fputs(" purge trx", f); }