   GET_LOCK(str,timeout)
Tries to obtain a lock with a name given by the string str, with a
timeout of timeout seconds.  Returns 1 if the lock was obtained
successfully, 0 if the attempt timed out (for example, because another
client has already locked the name), or NULL if an error
occurred (such as running out of memory or the thread was killed with
mysqladmin kill).  If you have a lock obtained with GET_LOCK(),
it is released when you execute
RELEASE_LOCK(), execute a new GET_LOCK(), or your connection
terminates (either normally or abnormally).

This function can be used to implement application locks or to
simulate record locks.  Names are locked on a server-wide basis.
If a name has been locked by one client, GET_LOCK() blocks
any request by another client for a lock with the same name. This
allows clients that agree on a given lock name to use the name to
perform cooperative advisory locking.
