1
# Test for simple lock issues
2
SELECT get_locks("foo", "foo2", "foo3");
3
SELECT if ((is_used_lock("foo") = CONNECTION_ID()), "YES", "NO");
4
SELECT if ((is_used_lock("foo2") = CONNECTION_ID()), "YES", "NO");
5
SELECT if ((is_used_lock("foo3") = CONNECTION_ID()), "YES", "NO");
7
SELECT release_lock("foo2");
8
SELECT if ((is_used_lock("foo") = CONNECTION_ID()), "YES", "NO");
9
SELECT if ((is_used_lock("foo2") = CONNECTION_ID()), "YES", "NO");
10
SELECT if ((is_used_lock("foo3") = CONNECTION_ID()), "YES", "NO");
12
SELECT release_locks();
13
SELECT if ((is_used_lock("foo") = CONNECTION_ID()), "YES", "NO");
14
SELECT if ((is_used_lock("foo2") = CONNECTION_ID()), "YES", "NO");
15
SELECT if ((is_used_lock("foo3") = CONNECTION_ID()), "YES", "NO");