Ubuntu 9.04安装Oracle 11,备案!!
时间:2010-12-03
来源:互联网
网上找到一些对Repeatable Read(可重复读)的解释,我大致翻译了一下:
大家最好看英文原文,这样原汁原味一些,如果我的翻译不准确请指出。
从以上描述中可以看出,repeatable隔离层级下,对于读操作确实保证多次read出来的结果是一致,但却看不出来如果防止第二类更新丢失的。
所谓第二类更新丢失:
这种情况下trsaction2的操作盖掉了 trsaction1 的操作,i被少+了一次
求解释repeatable隔离层级是如何实现防止第二类更新丢失的
代码:
The first time that a read is performed on a table results in that view of the table being preserved throughout that transaction.
在一个事务中,当第一次读一张表时,会立即被保存该表的一个视图。
Any changes made on that table committed by other transactions after that point are not seen.
在这之后,任何其他事务对这个表的改变本事务是看不到的。
However, if a different transaction commits a change between the time that you start your transaction and the time that you perform your first read on that table, you will see the changes made by that other transaction.
但是,如果一个不同的事务在你开启事务后第一次读之前提交了对该表的一个更新,你可以看到这些事务提交的改变。
在一个事务中,当第一次读一张表时,会立即被保存该表的一个视图。
Any changes made on that table committed by other transactions after that point are not seen.
在这之后,任何其他事务对这个表的改变本事务是看不到的。
However, if a different transaction commits a change between the time that you start your transaction and the time that you perform your first read on that table, you will see the changes made by that other transaction.
但是,如果一个不同的事务在你开启事务后第一次读之前提交了对该表的一个更新,你可以看到这些事务提交的改变。
大家最好看英文原文,这样原汁原味一些,如果我的翻译不准确请指出。
从以上描述中可以看出,repeatable隔离层级下,对于读操作确实保证多次read出来的结果是一致,但却看不出来如果防止第二类更新丢失的。
所谓第二类更新丢失:
代码:
trsaction1 trsaction2
time1 read i
time2 read i
time3 ++i并提交事务
time4 ++i提交事务
time1 read i
time2 read i
time3 ++i并提交事务
time4 ++i提交事务
这种情况下trsaction2的操作盖掉了 trsaction1 的操作,i被少+了一次
求解释repeatable隔离层级是如何实现防止第二类更新丢失的
作者: gzbao9999 发布时间: 2010-12-03
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28