~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-23 09:35:51 UTC
  • mfrom: (1933.2.13 catalogs)
  • Revision ID: brian@tangent.org-20101123093551-l5m7zhz3m5c4wmlk
Merge in changes for barriers (update for kill, etc).

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;