Lines Matching refs:lock
18 $lock = 'phptest_' . mt_rand(0, 100000);
23 if (!$res = mysqli_query($link, sprintf('SELECT GET_LOCK("%s", 2) AS _ok', $lock)))
32 printf("... lock '%s' acquired by thread %d\n", $lock, $thread_id);
45 printf("... calling IS_USED_LOCK() on '%s' using thread '%d'\n", $lock, $new_thread_id);
54 $lock,
57 printf("... calling IS_FREE_LOCK() on '%s' using thread '%d'\n", $lock, $new_thread_id);
66 $lock,
71 /* Ok, let's try a NEW connection and a NEW lock! */
79 } while ($lock == $newlock);
91 $lock,
102 ... lock 'phptest_%d' acquired by thread %d