~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/create_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:
109
109
     TABLE in the same way. That way we avoid that a new table is
110
110
     created during a gobal read lock.
111
111
   */
112
 
  if (! (need_start_waiting= ! wait_if_global_read_lock(session, 0, 1)))
 
112
  if (! (need_start_waiting= not session->wait_if_global_read_lock(0, 1)))
113
113
  {
114
114
    /* put tables back for PS rexecuting */
115
115
    session->lex->link_first_table_back(create_table, link_to_local);
146
146
             Release the protection against the global read lock and wake
147
147
             everyone, who might want to set a global read lock.
148
148
           */
149
 
          start_waiting_global_read_lock(session);
 
149
          session->startWaitingGlobalReadLock();
150
150
          /* put tables back for PS rexecuting */
151
151
          session->lex->link_first_table_back(create_table, link_to_local);
 
152
 
152
153
          return true;
153
154
        }
154
155
      }
224
225
     Release the protection against the global read lock and wake
225
226
     everyone, who might want to set a global read lock.
226
227
   */
227
 
  start_waiting_global_read_lock(session);
 
228
  session->startWaitingGlobalReadLock();
228
229
 
229
230
  return res;
230
231
}