~drizzle-trunk/drizzle/development

« back to all changes in this revision

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