• Marko Mäkelä's avatar
    MDEV-14589 InnoDB should not lock a delete-marked record · 35a9c90f
    Marko Mäkelä authored
    When the transaction isolation level is SERIALIZABLE, or when
    a locking read is performed in the REPEATABLE READ isolation level,
    InnoDB must lock delete-marked records in order to prevent another
    transaction from inserting something.
    
    However, at READ UNCOMMITTED or READ COMMITTED isolation level or
    when the parameter innodb_locks_unsafe_for_binlog is set, the
    repeatability of the reads does not matter, and there is no need
    to lock any records.
    
    row_search_for_mysql(): Skip locks on delete-marked committed records
    upfront, instead of invoking row_unlock_for_mysql() afterwards.
    The unlocking never worked for secondary index records.
    35a9c90f
row0sel.cc 152 KB