~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/user_locks/wait.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:
38
38
    if (barrier and barrier->getOwner() == getSession().getSessionId())
39
39
    {
40
40
      my_error(drizzled::ER_USER_LOCKS_CANT_WAIT_ON_OWN_BARRIER, MYF(0));
41
 
      null_value= false;
42
41
 
43
42
      return 0;
44
43
    }
52
51
      }
53
52
      else
54
53
      {
55
 
        barrier->wait();
 
54
        boost::this_thread::restore_interruption dl(getSession().getThreadInterupt());
 
55
 
 
56
        try {
 
57
          barrier->wait();
 
58
        }
 
59
        catch(boost::thread_interrupted const&)
 
60
        {
 
61
          // We need to issue a different sort of error here
 
62
          my_error(drizzled::ER_QUERY_INTERRUPTED, MYF(0));
 
63
          return 0;
 
64
        }
56
65
      }
57
66
      null_value= false;
58
67
 
61
70
  }
62
71
 
63
72
  my_error(drizzled::ER_USER_LOCKS_UNKNOWN_BARRIER, MYF(0));
64
 
  null_value= false;
65
73
 
66
74
  return 0;
67
75
}