For example, SELECT ... LOCK IN SHARE MODE sets an IS lock and SELECT ... FOR UPDATE sets an IX lock.
The intention locking protocol is as follows:
-
Before a transaction can acquire an
Slock on a row in tablet, it must first acquire anISor stronger lock ont. -
Before a transaction can acquire an
Xlock on a row, it must first acquire anIXlock ont.
These rules can be conveniently summarized by means of the following lock type compatibility matrix .
X | IX | S | IS | |
|---|---|---|---|---|
X | Conflict | Conflict | Conflict | Conflict |
IX | Conflict | Compatible | Conflict | Compatible |
S | Conflict | Conflict | Compatible | Compatible |
IS | Conflict | Compatible | Compatible | Compatible |
2900

被折叠的 条评论
为什么被折叠?



