~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/user_locks/release_lock.cc

  • Committer: Andrew Hutchings
  • Date: 2010-12-06 19:36:53 UTC
  • mfrom: (1976 staging)
  • mto: This revision was merged to the branch mainline in revision 1991.
  • Revision ID: andrew@linuxjedi.co.uk-20101206193653-l85vryv18jb0yxx8
Merge with trunk

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
    }