~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.cc

  • Committer: Brian Aker
  • Date: 2010-09-22 22:25:29 UTC
  • mto: (1791.1.1 drizzle)
  • mto: This revision was merged to the branch mainline in revision 1792.
  • Revision ID: brian@tangent.org-20100922222529-geo4wggmu5ntqa5k
Current boost work (more conversion).

Show diffs side-by-side

added added

removed removed

Lines of Context:
422
422
      If there is any table that has a lower refresh_version, wait until
423
423
      this is closed (or this thread is killed) before returning
424
424
    */
425
 
    session->mysys_var->current_mutex= LOCK_open.native_handle();
426
 
    session->mysys_var->current_cond= COND_refresh.native_handle();
 
425
    session->mysys_var->current_mutex= &LOCK_open;
 
426
    session->mysys_var->current_cond= &COND_refresh;
427
427
    session->set_proc_info("Flushing tables");
428
428
 
429
429
    session->close_old_data_files();
487
487
 
488
488
  if (wait_for_refresh)
489
489
  {
490
 
    pthread_mutex_lock(&session->mysys_var->mutex);
 
490
    boost::mutex::scoped_lock scopedLock(session->mysys_var->mutex);
491
491
    session->mysys_var->current_mutex= 0;
492
492
    session->mysys_var->current_cond= 0;
493
493
    session->set_proc_info(0);
494
 
    pthread_mutex_unlock(&session->mysys_var->mutex);
495
494
  }
496
495
 
497
496
  return result;
945
944
{
946
945
  /* Wait until the current table is up to date */
947
946
  const char *saved_proc_info;
948
 
  mysys_var->current_mutex= mutex.native_handle();
949
 
  mysys_var->current_cond= cond.native_handle();
 
947
  mysys_var->current_mutex= &mutex;
 
948
  mysys_var->current_cond= &cond;
950
949
  saved_proc_info= get_proc_info();
951
950
  set_proc_info("Waiting for table");
952
951
  if (!killed)
964
963
  */
965
964
 
966
965
  pthread_mutex_unlock(mutex.native_handle());
967
 
  pthread_mutex_lock(&mysys_var->mutex);
 
966
  boost::mutex::scoped_lock (mysys_var->mutex);
968
967
  mysys_var->current_mutex= 0;
969
968
  mysys_var->current_cond= 0;
970
969
  set_proc_info(saved_proc_info);
971
 
  pthread_mutex_unlock(&mysys_var->mutex);
972
970
}
973
971
 
974
972