Skip to content
  • Dyre Tjeldvoll's avatar
    12ada74a
    BUG#21021848: ASSERTION `M_STATUS == DA_ERROR' FAILED. · 12ada74a
    Dyre Tjeldvoll authored
    Problem: When I_S query which needed to perform full table open
    encountered a corrupt table it tried to repair it. To do this I_S
    query tried to acquire X metadata lock on the table. When I_S query
    was used in the middle of transaction this sometimes led to deadlocks
    if there was concurrent DDL. As result transaction was aborted and
    rolled back without appropriate error reported. For XA transaction in
    debug builds assert fired.
    
    Solution: Since it is undesirable to have an I_S query attempt repair
    (or discovery) the patch modifies the behavior of
    Open_table_context::recover_from_failed_open() to skip these
    operations if MYSQL_OPEN_FAIL_ON_MDL_CONFLICT set, and instead sets
    the error ER_WARN_I_S_SKIPPED_TABLE which will be converted to a
    warning. This will avoid deadlocks during I_S query execution.
    
    This returns the behavior of I_S queries to what they were before
    BUG#18075170 was fixed. The assert in conjunction with XA abort, which
    was present even before BUG#18075170, is now fixed.
    12ada74a
    BUG#21021848: ASSERTION `M_STATUS == DA_ERROR' FAILED.
    Dyre Tjeldvoll authored
    Problem: When I_S query which needed to perform full table open
    encountered a corrupt table it tried to repair it. To do this I_S
    query tried to acquire X metadata lock on the table. When I_S query
    was used in the middle of transaction this sometimes led to deadlocks
    if there was concurrent DDL. As result transaction was aborted and
    rolled back without appropriate error reported. For XA transaction in
    debug builds assert fired.
    
    Solution: Since it is undesirable to have an I_S query attempt repair
    (or discovery) the patch modifies the behavior of
    Open_table_context::recover_from_failed_open() to skip these
    operations if MYSQL_OPEN_FAIL_ON_MDL_CONFLICT set, and instead sets
    the error ER_WARN_I_S_SKIPPED_TABLE which will be converted to a
    warning. This will avoid deadlocks during I_S query execution.
    
    This returns the behavior of I_S queries to what they were before
    BUG#18075170 was fixed. The assert in conjunction with XA abort, which
    was present even before BUG#18075170, is now fixed.
Loading