• Marko Mäkelä's avatar
    MDEV-27909 InnoDB: Failing assertion: state == TRX_STATE_NOT_STARTED ... on DDL · 8840583a
    Marko Mäkelä authored
    The fix in commit 6e390a62 (MDEV-26772)
    was a step to the right direction, but implemented incorrectly.
    When an InnoDB persistent statistics table cannot be locked immediately,
    we must not let row_mysql_handle_errors() to roll back the transaction.
    
    lock_table_for_trx(): Add the parameter no_wait (default false)
    for an immediate return of DB_LOCK_WAIT in case of a conflict.
    
    ha_innobase::delete_table(), ha_innobase::rename_table():
    Pass no_wait=true to lock_table_for_trx() when needed,
    instead of temporarily setting THDVAR(thd, lock_wait_timeout) to 0.
    8840583a
ha_innodb.cc 613 KB