~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/rename_table.cc

  • Committer: Brian Aker
  • Date: 2010-11-08 20:10:51 UTC
  • mfrom: (1910.2.8 merge)
  • Revision ID: brian@tangent.org-20101108201051-fmplr6oke3c088kf
Encapsulation around locking/kill

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
    return true;
69
69
  }
70
70
 
71
 
  if (wait_if_global_read_lock(session, 0, 1))
 
71
  if (session->wait_if_global_read_lock(false, true))
72
72
    return true;
73
73
 
74
74
  LOCK_open.lock(); /* Rename table lock for exclusive access */
75
 
  if (lock_table_names_exclusively(session, table_list))
 
75
  if (session->lock_table_names_exclusively(table_list))
76
76
  {
77
77
    LOCK_open.unlock();
78
78
    goto err;
115
115
  }
116
116
 
117
117
  LOCK_open.lock(); /* unlock all tables held */
118
 
  unlock_table_names(table_list, NULL);
 
118
  table_list->unlock_table_names();
119
119
  LOCK_open.unlock();
120
120
 
121
121
err:
122
 
  start_waiting_global_read_lock(session);
 
122
  session->startWaitingGlobalReadLock();
123
123
 
124
124
  return error;
125
125
}