Rename the Boolean field trx->type to trx->is_purge

and remove the constants TRX_USER and TRX_PURGE.
This commit is contained in:
marko 2007-03-08 10:10:28 +00:00
parent 61f029023d
commit 7ae16135b9
3 changed files with 5 additions and 11 deletions

View file

@ -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

View file

@ -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));

View file

@ -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);
}