~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/locking/global.cc

  • Committer: Brian Aker
  • Date: 2010-11-08 20:00:45 UTC
  • mto: (1921.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 1916.
  • Revision ID: brian@tangent.org-20101108200045-wgysfvli5mtduszd
EnapsulateĀ Kill.

Show diffs side-by-side

added added

removed removed

Lines of Context:
320
320
  }
321
321
 
322
322
  set_proc_info(0);
323
 
  if (killed)
 
323
  if (getKilled())
324
324
  {
325
325
    send_kill_message();
326
326
    if (sql_lock)
755
755
 
756
756
  while (locked_named_table(table_list))
757
757
  {
758
 
    if (killed)
 
758
    if (getKilled())
759
759
    {
760
760
      result=1;
761
761
      break;
1001
1001
 
1002
1002
    waiting_for_read_lock++;
1003
1003
    boost_unique_lock_t scopedLock(LOCK_global_read_lock, boost::adopt_lock_t());
1004
 
    while (protect_against_global_read_lock && not killed)
 
1004
    while (protect_against_global_read_lock && not getKilled())
1005
1005
      COND_global_read_lock.wait(scopedLock);
1006
1006
    waiting_for_read_lock--;
1007
1007
    scopedLock.release();
1008
 
    if (killed)
 
1008
    if (getKilled())
1009
1009
    {
1010
1010
      exit_cond(old_message);
1011
1011
      return true;
1083
1083
    old_message= enter_cond(COND_global_read_lock, LOCK_global_read_lock,
1084
1084
                            "Waiting for release of readlock");
1085
1085
 
1086
 
    while (must_wait(is_not_commit) && not killed &&
 
1086
    while (must_wait(is_not_commit) && not getKilled() &&
1087
1087
           (!abort_on_refresh || version == refresh_version))
1088
1088
    {
1089
1089
      boost_unique_lock_t scoped(LOCK_global_read_lock, boost::adopt_lock_t());
1090
1090
      COND_global_read_lock.wait(scoped);
1091
1091
      scoped.release();
1092
1092
    }
1093
 
    if (killed)
 
1093
    if (getKilled())
1094
1094
      result=1;
1095
1095
  }
1096
1096
  if (not abort_on_refresh && not result)
1144
1144
  global_read_lock_blocks_commit++;
1145
1145
  old_message= enter_cond(COND_global_read_lock, LOCK_global_read_lock,
1146
1146
                          "Waiting for all running commits to finish");
1147
 
  while (protect_against_global_read_lock && not killed)
 
1147
  while (protect_against_global_read_lock && not getKilled())
1148
1148
  {
1149
1149
    boost_unique_lock_t scopedLock(LOCK_global_read_lock, boost::adopt_lock_t());
1150
1150
    COND_global_read_lock.wait(scopedLock);
1151
1151
    scopedLock.release();
1152
1152
  }
1153
 
  if ((error= test(killed)))
 
1153
  if ((error= test(getKilled())))
1154
1154
  {
1155
1155
    global_read_lock_blocks_commit--; // undo what we did
1156
1156
  }