31
31
drizzled::String *res= args[0]->val_str(&value);
33
if (not res || not res->length())
35
my_error(drizzled::ER_USER_LOCKS_INVALID_NAME_LOCK, MYF(0));
40
if (not res->length())
43
40
drizzled::session_id_t id= getSession().getSessionId();
44
boost::tribool result= user_locks::Locks::getInstance().release(Key(getSession().getSecurityContext(), res->c_str()), id);
48
user_locks::Storable *list= static_cast<user_locks::Storable *>(getSession().getProperty("user_locks"));
50
if (list) // Just in case we ever blow the assert
51
list->erase(Key(getSession().getSecurityContext(), res->c_str()));
41
locks::return_t result;
43
boost::this_thread::restore_interruption dl(getSession().getThreadInterupt());
45
result= user_locks::Locks::getInstance().release(Key(getSession().getSecurityContext(), res->c_str()), id);
47
catch(boost::thread_interrupted const& error)
49
my_error(drizzled::ER_QUERY_INTERRUPTED, MYF(0));
59
user_locks::Storable *list= static_cast<user_locks::Storable *>(getSession().getProperty("user_locks"));
61
if (list) // Just in case we ever blow the assert
62
list->erase(Key(getSession().getSecurityContext(), res->c_str()));
66
case locks::NOT_FOUND:
69
case locks::NOT_OWNED_BY:
70
my_error(drizzled::ER_USER_LOCKS_NOT_OWNER_OF_LOCK, MYF(0));
65
75
} /* namespace user_locks */