~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/user_locks/get_lock.cc

  • Committer: Brian Aker
  • Date: 2010-11-19 18:36:34 UTC
  • mto: This revision was merged to the branch mainline in revision 1948.
  • Revision ID: brian@tangent.org-20101119183634-f0hihga8m27m1p39
Merge in the ability to kill off locks as well as barriers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
  if (list) // To be compatible with MySQL, we will now release all other locks we might have.
51
51
    list->erase_all();
52
52
 
53
 
  boost::tribool result= user_locks::Locks::getInstance().lock(getSession().getSessionId(), Key(getSession().getSecurityContext(), res->c_str()), wait_time);
 
53
  boost::tribool result;
 
54
  {
 
55
    boost::this_thread::restore_interruption dl(getSession().getThreadInterupt());
 
56
 
 
57
    try {
 
58
      result= user_locks::Locks::getInstance().lock(getSession().getSessionId(), Key(getSession().getSecurityContext(), res->c_str()), wait_time);
 
59
    }
 
60
    catch(boost::thread_interrupted const& error)
 
61
    {
 
62
      my_error(drizzled::ER_QUERY_INTERRUPTED, MYF(0));
 
63
      null_value= true;
 
64
 
 
65
      return 0;
 
66
    }
 
67
  }
54
68
 
55
69
  if (boost::indeterminate(result))
56
70
    null_value= true;