So, what is the bug here? Undocumented "ROLLING BACK" message? Or the fact that transaction continued?
I see the following in the code:
trx_get_que_state_str(
/*==================*/
const trx_t* trx) /*!< in: transaction */
{
/* be sure to adjust TRX_QUE_STATE_STR_MAX_LEN if you change this */
switch (trx->lock.que_state) {
case TRX_QUE_RUNNING: return("RUNNING");
case TRX_QUE_LOCK_WAIT: return("LOCK WAIT");
case TRX_QUE_ROLLING_BACK: return("ROLLING BACK");
case TRX_QUE_COMMITTING: return("COMMITTING");
default: return("UNKNOWN");
}
}
And then:
Percona-Server/storage/innobase/trx/trx0trx.cc:2040: case TRX_QUE_ROLLING_BACK:
Here we have:
/* trx->lock.que_state of an ACTIVE transaction may change
while we are not holding trx->mutex. We perform a dirty read
for performance reasons. */
switch (trx->lock.que_state) {
case TRX_QUE_RUNNING: newline = FALSE; break;
case TRX_QUE_LOCK_WAIT: fputs("LOCK WAIT ", f); break;
case TRX_QUE_ROLLING_BACK: fputs("ROLLING BACK ", f); break;
case TRX_QUE_COMMITTING: fputs("COMMITTING ", f); break;
default: fprintf(f, "que state %lu ", (ulong) trx->lock.que_state);
}
/*********************************************************************//**
Starts a rollback operation, creates the UNDO graph that will do the
actual undo operation.
@return query graph thread that will perform the UNDO operations. */
static
que_thr_t*
trx_rollback_start(
/*===============*/
trx_t* trx, /*!< in: transaction */
ib_id_t roll_limit) /*!< in: rollback to undo no (for partial undo), 0 if we are rolling back the entire transaction */
{
...
/* Build a 'query' graph which will perform the undo operations */
roll_graph = trx_roll_graph_build(trx);
trx->graph = roll_graph;
trx->lock.que_state = TRX_QUE_ROLLING_BACK;
return(que_fork_start_command(roll_graph));
}
So, my idea is that maybe transaction had to do some "mini rollback" to get data for the table at the moment statement execution began, to check some constraint maybe?
So, what is the bug here? Undocumented "ROLLING BACK" message? Or the fact that transaction continued?
I see the following in the code:
trx_get_ que_state_ str( ======= ======* / STATE_STR_ MAX_LEN if you change this */ que_state) {
return( "RUNNING" );
return( "LOCK WAIT"); ROLLING_ BACK:
return( "ROLLING BACK");
return( "COMMITTING" );
return( "UNKNOWN" );
/*=====
const trx_t* trx) /*!< in: transaction */
{
/* be sure to adjust TRX_QUE_
switch (trx->lock.
case TRX_QUE_RUNNING:
case TRX_QUE_LOCK_WAIT:
case TRX_QUE_
case TRX_QUE_COMMITTING:
default:
}
}
And then:
Percona- Server/ storage/ innobase/ trx/trx0trx. cc:2040: case TRX_QUE_ ROLLING_ BACK:
Here we have:
/* trx->lock.que_state of an ACTIVE transaction may change
while we are not holding trx->mutex. We perform a dirty read
for performance reasons. */
switch (trx->lock. que_state) {
newline = FALSE; break;
fputs( "LOCK WAIT ", f); break; ROLLING_ BACK:
fputs( "ROLLING BACK ", f); break;
fputs( "COMMITTING ", f); break;
fprintf( f, "que state %lu ", (ulong) trx->lock. que_state) ;
case TRX_QUE_RUNNING:
case TRX_QUE_LOCK_WAIT:
case TRX_QUE_
case TRX_QUE_COMMITTING:
default:
}
Percona- Server/ storage/ innobase/ trx/trx0roll. cc:1300: trx->lock.que_state = TRX_QUE_ ROLLING_ BACK;
Here we have:
/****** ******* ******* ******* ******* ******* ******* ******* ******* ******* //**
partial undo), 0 if we are rolling back
the entire transaction */
Starts a rollback operation, creates the UNDO graph that will do the
actual undo operation.
@return query graph thread that will perform the UNDO operations. */
static
que_thr_t*
trx_rollback_start(
/*===============*/
trx_t* trx, /*!< in: transaction */
ib_id_t roll_limit) /*!< in: rollback to undo no (for
{
...
/* Build a 'query' graph which will perform the undo operations */
roll_graph = trx_roll_ graph_build( trx);
trx->graph = roll_graph;
}
So, my idea is that maybe transaction had to do some "mini rollback" to get data for the table at the moment statement execution began, to check some constraint maybe?
Just a speculation for now.