~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.cc

  • Committer: Brian Aker
  • Date: 2008-10-08 02:28:58 UTC
  • mfrom: (489.1.13 codestyle)
  • Revision ID: brian@tangent.org-20081008022858-ea8esagkxmn0dupc
Merge of Monty's work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
759
759
    */
760
760
    thd->mysys_var->current_mutex= &LOCK_open;
761
761
    thd->mysys_var->current_cond= &COND_refresh;
762
 
    thd_proc_info(thd, "Flushing tables");
 
762
    thd->set_proc_info("Flushing tables");
763
763
 
764
764
    close_old_data_files(thd,thd->open_tables,1,1);
765
765
    mysql_ha_flush(thd);
824
824
    pthread_mutex_lock(&thd->mysys_var->mutex);
825
825
    thd->mysys_var->current_mutex= 0;
826
826
    thd->mysys_var->current_cond= 0;
827
 
    thd_proc_info(thd, 0);
 
827
    thd->set_proc_info(0);
828
828
    pthread_mutex_unlock(&thd->mysys_var->mutex);
829
829
  }
830
830
  return(result);
1739
1739
  thd->mysys_var->current_mutex= mutex;
1740
1740
  thd->mysys_var->current_cond= cond;
1741
1741
  proc_info=thd->get_proc_info();
1742
 
  thd_proc_info(thd, "Waiting for table");
 
1742
  thd->set_proc_info("Waiting for table");
1743
1743
  if (!thd->killed)
1744
1744
    (void) pthread_cond_wait(cond, mutex);
1745
1745
 
1758
1758
  pthread_mutex_lock(&thd->mysys_var->mutex);
1759
1759
  thd->mysys_var->current_mutex= 0;
1760
1760
  thd->mysys_var->current_cond= 0;
1761
 
  thd_proc_info(thd, proc_info);
 
1761
  thd->set_proc_info(proc_info);
1762
1762
  pthread_mutex_unlock(&thd->mysys_var->mutex);
1763
1763
  return;
1764
1764
}
2906
2906
{
2907
2907
  bool result;
2908
2908
 
2909
 
  thd_proc_info(thd, "Waiting for tables");
 
2909
  thd->set_proc_info("Waiting for tables");
2910
2910
  pthread_mutex_lock(&LOCK_open);
2911
2911
  while (!thd->killed)
2912
2912
  {
2922
2922
  else
2923
2923
  {
2924
2924
    /* Now we can open all tables without any interference */
2925
 
    thd_proc_info(thd, "Reopen tables");
 
2925
    thd->set_proc_info("Reopen tables");
2926
2926
    thd->version= refresh_version;
2927
2927
    result=reopen_tables(thd,0,0);
2928
2928
  }
2929
2929
  pthread_mutex_unlock(&LOCK_open);
2930
 
  thd_proc_info(thd, 0);
 
2930
  thd->set_proc_info(0);
2931
2931
  return(result);
2932
2932
}
2933
2933
 
3301
3301
  thd->current_tablenr= 0;
3302
3302
 restart:
3303
3303
  *counter= 0;
3304
 
  thd_proc_info(thd, "Opening tables");
 
3304
  thd->set_proc_info("Opening tables");
3305
3305
 
3306
3306
  /*
3307
3307
    For every table in the list of tables to open, try to find or open
3381
3381
    }
3382
3382
  }
3383
3383
 
3384
 
  thd_proc_info(thd, 0);
 
3384
  thd->set_proc_info(0);
3385
3385
  free_root(&new_frm_mem, MYF(0));              // Free pre-alloced block
3386
3386
 
3387
3387
  if (result && tables)
3514
3514
  Table *table;
3515
3515
  bool refresh;
3516
3516
 
3517
 
  thd_proc_info(thd, "Opening table");
 
3517
  thd->set_proc_info("Opening table");
3518
3518
  thd->current_tablenr= 0;
3519
3519
  while (!(table= open_table(thd, table_list, &refresh, 0)) &&
3520
3520
         refresh)
3539
3539
    }
3540
3540
  }
3541
3541
 
3542
 
  thd_proc_info(thd, 0);
 
3542
  thd->set_proc_info(0);
3543
3543
  return(table);
3544
3544
}
3545
3545