• Magne Mahre's avatar
    Bug#56452 Assertion failed: thd->transaction.stmt.is_empty() || · 623ed194
    Magne Mahre authored
              thd->in_sub_stmt
          
    In a precursor patch for Bug#52044 
    (revid:bzr/kostja@stripped), a
    number of reorganizations of code was made. In addition some
    assertions were added to ensure the correct transactional state.
          
    The reorganization had a small glitch so statements that was
    active in the query cache was not followed by a
    statement commit/rollback (this code was removed). A section
    in the trans_commit_stmt/trans_rollback_stmt code is to
    clear the thd->transaction.stmt list of affected storage
    engines.  When a new statement is initiated, an assert
    introduced by the 523044 patch checks if this list is cleared.
    When the query cache is accessed, this list may be populated,
    and since it's not committed it will not be cleared.
          
    This fix adds explicit statement commit or rollback for
    statements that is contained in the query cache.
    623ed194
cache_innodb.test 707 Bytes