Bug #55834 INNODB_TRX docs list BLOCKED instead of LOCK WAIT state
Submitted: 9 Aug 2010 8:42 Modified: 10 Aug 2010 18:18
Reporter: Mark Leith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.5 OS:Any
Assigned to: John Russell CPU Architecture:Any

[9 Aug 2010 8:42] Mark Leith
Description:
The documentation on the INNODB_TRX I_S table lists a "BLOCKED" state - which does not exist in the code. It should instead be "renamed" throughout the following page to "LOCK WAIT" (as is shown in the example output for the table at the bottom of the page):

http://dev.mysql.com/doc/refman/5.5/en/innodb-information-schema-transactions.html

How to repeat:
Look at:

/*******************************************************************//**
Retrieves transaction's que state in a human readable string. The string
should not be free()'d or modified.
@return string in the data segment */
UNIV_INLINE
const char*
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->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");
        }
}

Suggested fix:
s/BLOCKED/LOCK WAIT
[10 Aug 2010 18:18] John Russell
Made this change in the Plugin doc for 5.1, and in the Ref Man section for 5.5.
[10 Sep 2010 21:33] John Russell
Corrected a couple of other instances that were structured differently (plain text vs. XML entities) and didn't get caught on the first sweep.