46
user_locks::Storable *list= static_cast<user_locks::Storable *>(getSession().getProperty("user_locks"));
46
user_locks::Storable *list= getSession().getProperty<user_locks::Storable>("user_locks");
47
47
if (list) // To be compatible with MySQL, we will now release all other locks we might have.
51
drizzled::identifier::User::const_shared_ptr user_identifier(getSession().user());
50
drizzled::identifier::user::ptr user_identifier(getSession().user());
53
52
boost::this_thread::restore_interruption dl(getSession().getThreadInterupt());
56
result= user_locks::Locks::getInstance().lock(getSession().getSessionId(), Key(*user_identifier, res->c_str()), wait_time);
56
if (not user_locks::Locks::getInstance().lock(getSession().getSessionId(), Key(*user_identifier, res->c_str()), wait_time))
58
catch(boost::thread_interrupted const& error)
59
catch (boost::thread_interrupted const&)
60
61
my_error(drizzled::ER_QUERY_INTERRUPTED, MYF(0));
71
list= new user_locks::Storable(getSession().getSessionId());
72
getSession().setProperty("user_locks", list);
75
list->insert(Key(*user_identifier, res->c_str()));
67
list= getSession().setProperty("user_locks", new user_locks::Storable(getSession().getSessionId()));
68
list->insert(Key(*user_identifier, res->c_str()));
83
72
} /* namespace user_locks */