-
Notifications
You must be signed in to change notification settings - Fork 986
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemeting of more locking in SELECT statements
SELECT ... FOR SHARE SELECT ... LOCK IN SHARE MODE SELECT ... FOR (UPDATE|SHARE) [OF ...] (NOWAIT|SKIP LOCKED)
- Loading branch information
1 parent
a51a23a
commit 9ed7094
Showing
7 changed files
with
189 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
SELECT 1 FROM dual FOR UPDATE; | ||
SET autocommit=0; | ||
SELECT 1 FROM dual FOR UPDATE; | ||
SELECT 1 FROM dual FOR UPDATE OF tbl1 ; | ||
SELECT 1 FROM dual a JOIN dual b; | ||
SELECT 1, 3, 5, 6 , 'aa' FROM dual a JOIN dual b; | ||
ROLLBACK; | ||
SELECT 1 FROM dual FOR SHARE; | ||
ROLLBACK; | ||
SELECT 1 FROM dual LOCK IN SHARE MODE ; | ||
ROLLBACK; | ||
SET autocommit=1; | ||
SELECT 1 FROM dual FOR SHARE; | ||
SELECT 1 FROM dual FOR UPDATE; |