Last active
August 20, 2019 15:40
-
-
Save honux77/00c0a88e1bf6da1ed6b2462eca38adb1 to your computer and use it in GitHub Desktop.
mysql atomic increment example
This file contains hidden or 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
USE honuxdb; | |
SET SESSION transaction_isolation='SERIALIZABLE'; | |
# SELECT @@GLOBAL.transaction_isolation, @@transaction_isolation; | |
START TRANSACTION; | |
SELECT SLEEP(3); | |
UPDATE SUA SET B = B + 1 WHERE A = 'YJ'; | |
SELECT * FROM SUA; | |
COMMIT; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://www.byteslounge.com/tutorials/spring-transaction-isolation-tutorial 참고