22 #include <plugin/user_locks/module.h>
23 #include <plugin/user_locks/barrier_storage.h>
27 namespace user_locks {
34 if (res and res->length())
36 Barrier::shared_ptr barrier= Barriers::getInstance().find(
Key(*getSession().user(), res->c_str()));
38 if (barrier and barrier->getOwner() == getSession().
getSessionId())
40 my_error(drizzled::ER_USER_LOCKS_CANT_WAIT_ON_OWN_BARRIER, MYF(0));
50 barrier->wait(generation);
54 boost::this_thread::restore_interruption dl(getSession().getThreadInterupt());
59 catch(boost::thread_interrupted
const&)
62 my_error(drizzled::ER_QUERY_INTERRUPTED, MYF(0));
71 else if (not res || not res->length())
73 my_error(drizzled::ER_USER_LOCKS_INVALID_NAME_BARRIER, MYF(0));
77 my_error(drizzled::ER_USER_LOCKS_UNKNOWN_BARRIER, MYF(0));
virtual int64_t val_int()=0
session_id_t getSessionId() const
virtual String * val_str(String *str)=0