Commit 7ae16135 authored by marko's avatar marko

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

and remove the constants TRX_USER and TRX_PURGE.
parent 61f02902
...@@ -402,7 +402,7 @@ struct trx_struct{ ...@@ -402,7 +402,7 @@ struct trx_struct{
const char* op_info; /* English text describing the const char* op_info; /* English text describing the
current operation, or an empty current operation, or an empty
string */ 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 ulint conc_state; /* state of the trx from the point
of view of concurrency control: of view of concurrency control:
TRX_ACTIVE, TRX_COMMITTED_IN_MEMORY, TRX_ACTIVE, TRX_COMMITTED_IN_MEMORY,
...@@ -673,12 +673,6 @@ struct trx_struct{ ...@@ -673,12 +673,6 @@ struct trx_struct{
single operation of a single operation of a
transaction, e.g., a parallel transaction, e.g., a parallel
query */ 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 */ /* Transaction concurrency states */
#define TRX_NOT_STARTED 1 #define TRX_NOT_STARTED 1
#define TRX_ACTIVE 2 #define TRX_ACTIVE 2
......
...@@ -221,7 +221,7 @@ trx_purge_sys_create(void) ...@@ -221,7 +221,7 @@ trx_purge_sys_create(void)
purge_sys->trx = purge_sys->sess->trx; 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)); ut_a(trx_start_low(purge_sys->trx, ULINT_UNDEFINED));
......
...@@ -109,7 +109,7 @@ trx_create( ...@@ -109,7 +109,7 @@ trx_create(
trx->op_info = ""; trx->op_info = "";
trx->type = TRX_USER; trx->is_purge = 0;
trx->conc_state = TRX_NOT_STARTED; trx->conc_state = TRX_NOT_STARTED;
trx->start_time = time(NULL); trx->start_time = time(NULL);
...@@ -667,7 +667,7 @@ trx_start_low( ...@@ -667,7 +667,7 @@ trx_start_low(
ut_ad(mutex_own(&kernel_mutex)); ut_ad(mutex_own(&kernel_mutex));
ut_ad(trx->rseg == NULL); ut_ad(trx->rseg == NULL);
if (trx->type == TRX_PURGE) { if (trx->is_purge) {
trx->id = ut_dulint_zero; trx->id = ut_dulint_zero;
trx->conc_state = TRX_ACTIVE; trx->conc_state = TRX_ACTIVE;
trx->start_time = time(NULL); trx->start_time = time(NULL);
...@@ -1708,7 +1708,7 @@ trx_print( ...@@ -1708,7 +1708,7 @@ trx_print(
fputs(trx->op_info, f); fputs(trx->op_info, f);
} }
if (trx->type != TRX_USER) { if (trx->is_purge) {
fputs(" purge trx", f); fputs(" purge trx", f);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment