• Jon Olav Hauglid's avatar
    Bug#12346411 SQL/LOG.CC:6509: ASSERTION `PREPARED_XIDS > 0' FAILED · e9b8feef
    Jon Olav Hauglid authored
    This assert could be triggered during two phase commit if binary
    log was used as transaction coordinator log. The triggered assert
    checks that the same number of transaction IDs are processed in
    the prepare and commit phases.
    
    The reason it was triggered, was that the transaction consisted
    of an INSERT/UPDATE IGNORE that had an ignorable error. Since it
    had an error, no row log events were made and therefore
    prepared_xids was 0. However, since it was an IGNORE statement,
    the statement started a read/write statement transaction, committed
    it and completed successfully.
    
    This patch fixes the problem by adjusting the assert to take
    this possibility into account.
    
    Test case added to binlog.binlog_innodb_row.test.
    e9b8feef
log.cc 187 KB