~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/user_locks/release_lock.cc

  • Committer: Brian Aker
  • Date: 2010-12-18 10:14:05 UTC
  • mfrom: (2008.1.3 clean)
  • Revision ID: brian@tangent.org-20101218101405-qjbse29shi9coklg
Merge of user identifier work

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