• Marko Mäkelä's avatar
    MDEV-28445 Secondary index locking invokes costly trx_sys.get_min_trx_id() · b6e41e38
    Marko Mäkelä authored
    lock_sec_rec_read_check_and_lock(): Remove a redundant check
    for trx_sys.get_min_trx_id(). This would be checked in
    lock_sec_rec_some_has_impl() anyway. Also, test the
    cheapest conditions first.
    
    lock_sec_rec_some_has_impl(): Replace trx_sys.get_min_trx_id()
    with trx_sys.find_same_or_older() that is much easier to evaluate.
    
    Inspired by mysql/mysql-server@0a0c0db97e9c9705f4dffc629a770fb87a60cb22
    b6e41e38
trx0sys.h 35.6 KB