Created
August 8, 2012 21:30
-
-
Save jbarciauskas/3298944 to your computer and use it in GitHub Desktop.
try to get multiple locks in mysql
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
mysql> select get_lock('foo', 1200); | |
+-----------------------+ | |
| get_lock('foo', 1200) | | |
+-----------------------+ | |
| 1 | | |
+-----------------------+ | |
1 row in set (0.00 sec) | |
mysql> select get_lock('bar', 1200); | |
+-----------------------+ | |
| get_lock('bar', 1200) | | |
+-----------------------+ | |
| 1 | | |
+-----------------------+ | |
1 row in set (0.00 sec) | |
mysql> select release_lock('foo'); | |
+---------------------+ | |
| release_lock('foo') | | |
+---------------------+ | |
| NULL | | |
+---------------------+ | |
1 row in set (0.00 sec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment