函数lock_rec_get_first

/*********************************************************************//**
Gets the first explicit lock request on a record.
@return    first lock, NULL if none exists */
UNIV_INLINE
lock_t*
lock_rec_get_first(
/*===============*/
    const buf_block_t*    block,    /*!< in: block containing the record */
    ulint            heap_no)/*!< in: heap number of the record */
{
    lock_t*    lock;

    //lock_rec_get_first_on_page 函数实现    //lock_reg_get_nth_bit  查看某记录是否已加锁 函数实现    for (lock = lock_rec_get_first_on_page(block); lock; lock = lock_rec_get_next_on_page(lock)) {
        if (lock_rec_get_nth_bit(lock, heap_no)) {
            break;
        }
    }

    return(lock);
}
上一篇:android sdk更新代理设置


下一篇:Linode和DigitalOcean lnmp一键安装包哪个好?