-
-
Save explorer14/6765ac93b696b54a10a53e3ea01051cb to your computer and use it in GitHub Desktop.
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
#Transaction 1 | |
set autocommit = off; | |
set SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE ; | |
start transaction; | |
select * from TrxDb.Products where Id = 1000; | |
do sleep(8); | |
update TrxDb.Products set stock = 8 where Id = 1000 and Version = 1; | |
#Transaction 2 | |
set autocommit = off; | |
set SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE ; | |
start transaction; | |
do sleep(5); | |
select * from TrxDb.Products where Id = 1000; | |
update TrxDb.Products set stock = 8 where Id = 1000 and Version = 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment