MySQL数据库InnoDB存储引擎中的锁机制--转载
原文地址:http://www.uml.org.cn/sjjm/201205302.asp
= min trx id for the trx list,ordatabase recovery is running. We do not write the changes of a page max trx id to the log,and therefore during recovery,this value for a page may be incorrect. */
locks 存放一个表的所有表级锁。 rec_hash存放所有表的行锁。Hash值根据(spaceid,pageno)来计算。 trx_locks存放事务的所有锁,包括表级锁和行级锁。一个事务的所有锁,在事务结束时,一起释放。代码在lock_release_off_kernel().如果有等待的锁可以被授权,则会将等待的锁,转变为被授权的锁,并唤醒相应的事务。
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |