22 #include <plugin/user_locks/module.h>
26 namespace user_locks {
33 if (not res || not res->length())
35 my_error(drizzled::ER_USER_LOCKS_INVALID_NAME_LOCK, MYF(0));
46 found= user_locks::Locks::getInstance().isUsed(
Key(*getSession().user(), res->c_str()),
id);
49 boost::this_thread::restore_interruption dl(getSession().getThreadInterupt());
51 user_locks::Locks::getInstance().waitCreate();
53 catch(boost::thread_interrupted
const& error)
55 my_error(drizzled::ER_QUERY_INTERRUPTED, MYF(0));
62 if (
id == getSession().getSessionId())
64 my_error(drizzled::ER_USER_LOCKS_CANT_WAIT_ON_OWN_LOCK, MYF(0));