1
SELECT get_lock("foo");
4
SELECT release_lock("foo");
7
SELECT get_lock("foo", 1);
10
SELECT release_lock("foo");
13
SELECT get_lock("foo", 10);
16
SELECT release_lock("foo");
19
set @lock_name= "new_name";
20
SELECT get_lock(@lock_name);
23
SELECT if ((is_used_lock(@lock_name) = CONNECTION_ID()), "YES", "NO");
24
if ((is_used_lock(@lock_name) = CONNECTION_ID()), "YES", "NO")
26
SELECT release_lock(@lock_name);
27
release_lock(@lock_name)