22 #include <plugin/user_locks/module.h>
23 #include <plugin/user_locks/lock_storage.h>
27 namespace user_locks {
39 if (not res || not res->length())
41 my_error(drizzled::ER_USER_LOCKS_INVALID_NAME_LOCK, MYF(0));
50 drizzled::identifier::user::ptr user_identifier(getSession().user());
52 boost::this_thread::restore_interruption dl(getSession().getThreadInterupt());
56 if (not user_locks::Locks::getInstance().lock(getSession().getSessionId(),
Key(*user_identifier, res->c_str()), wait_time))
59 catch (boost::thread_interrupted
const&)
61 my_error(drizzled::ER_QUERY_INTERRUPTED, MYF(0));
67 list= getSession().setProperty(
"user_locks",
new user_locks::Storable(getSession().getSessionId()));
68 list->insert(
Key(*user_identifier, res->c_str()));
virtual int64_t val_int()=0
virtual String * val_str(String *str)=0