~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/user_locks/release_lock.cc

  • Committer: Lee Bieber
  • Date: 2010-12-13 18:43:55 UTC
  • mfrom: (1993.3.2 trunk-bug-686773)
  • mto: This revision was merged to the branch mainline in revision 1994.
  • Revision ID: kalebral@gmail.com-20101213184355-tinkj77bvfwwy6ql
Merge Andrew - fix bug 686773: TableFunction::Generator::push() needs assert

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
  }
38
38
  null_value= false;
39
39
 
40
 
  drizzled::identifier::User::const_shared_ptr user_identifier(getSession().user());
41
40
  drizzled::session_id_t id= getSession().getSessionId();
42
41
  locks::return_t result;
43
42
  {
44
43
    boost::this_thread::restore_interruption dl(getSession().getThreadInterupt());
45
44
    try {
46
 
      result= user_locks::Locks::getInstance().release(Key(*user_identifier, res->c_str()), id);
 
45
      result= user_locks::Locks::getInstance().release(Key(getSession().getSecurityContext(), res->c_str()), id);
47
46
    }
48
47
    catch(boost::thread_interrupted const& error)
49
48
    {
60
59
      user_locks::Storable *list= static_cast<user_locks::Storable *>(getSession().getProperty("user_locks"));
61
60
      assert(list);
62
61
      if (list) // Just in case we ever blow the assert
63
 
        list->erase(Key(*user_identifier, res->c_str()));
 
62
        list->erase(Key(getSession().getSecurityContext(), res->c_str()));
64
63
 
65
64
      return 1;
66
65
    }