Row-Level Locking (323)

Both read committed and serializable transactions use row-level locking, and both will
wait if they try to change a row updated by an uncommitted concurrent transaction.
The second transaction that tries to update a given row waits for the other transaction
to commit or undo and release its lock. If that other transaction rolls back, the waiting
transaction, regardless of its isolation mode, can proceed to change the previously
locked row as if the other transaction had not existed.

However, if the other blocking transaction commits and releases its locks, a read
committed transaction proceeds with its intended update. A serializable transaction,
however, fails with the error Cannot serialize access error, because the other
transaction has committed a change that was made since the serializable transaction
began.

行级锁
1. 已提交读取与串行化都采用行级锁技术 , 他们在更新未提交的并发事务修改的数据行时
都会发生等待 , 等待未提交的并发事务提交或撤销,释放锁 . 如果其他的事务回滚 ,
两者都都能修改之前被锁住的数据行,如同未提交的并发事务不存在一样
2. 当导致阻塞的事务交并释放了锁后 , 已提交读写模式下的等待事务就能够继续执行其中的更新
操作 , 而在串行化模式下的等待事务将出现无法进行串行化访问的错误

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10599713/viewspace-989547/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10599713/viewspace-989547/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值