~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_repl.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:
718
718
 
719
719
        if (read_packet)
720
720
        {
721
 
          thd_proc_info(thd, "Sending binlog event to slave");
 
721
          thd->set_proc_info("Sending binlog event to slave");
722
722
          if (my_net_write(net, (unsigned char*) packet->ptr(), packet->length()) )
723
723
          {
724
724
            errmsg = "Failed on my_net_write()";
756
756
      bool loop_breaker = 0;
757
757
      /* need this to break out of the for loop from switch */
758
758
 
759
 
      thd_proc_info(thd, "Finished reading one binlog; switching to next binlog");
 
759
      thd->set_proc_info("Finished reading one binlog; switching to next binlog");
760
760
      switch (mysql_bin_log.find_next_log(&linfo, 1)) {
761
761
      case LOG_INFO_EOF:
762
762
        loop_breaker = (flags & BINLOG_DUMP_NON_BLOCK);
804
804
  (void)my_close(file, MYF(MY_WME));
805
805
 
806
806
  my_eof(thd);
807
 
  thd_proc_info(thd, "Waiting to finalize termination");
 
807
  thd->set_proc_info("Waiting to finalize termination");
808
808
  pthread_mutex_lock(&LOCK_thread_count);
809
809
  thd->current_linfo = 0;
810
810
  pthread_mutex_unlock(&LOCK_thread_count);
811
811
  return;
812
812
 
813
813
err:
814
 
  thd_proc_info(thd, "Waiting to finalize termination");
 
814
  thd->set_proc_info("Waiting to finalize termination");
815
815
  end_io_cache(&log);
816
816
  /*
817
817
    Exclude  iteration through thread list
957
957
  if (!thd)
958
958
    thd = current_thd;
959
959
 
960
 
  thd_proc_info(thd, "Killing slave");
 
960
  thd->set_proc_info("Killing slave");
961
961
  int thread_mask;
962
962
  lock_slave_threads(mi);
963
963
  // Get a mask of _running_ threads
984
984
                 ER(ER_SLAVE_WAS_NOT_RUNNING));
985
985
  }
986
986
  unlock_slave_threads(mi);
987
 
  thd_proc_info(thd, 0);
 
987
  thd->set_proc_info(0);
988
988
 
989
989
  if (slave_errno)
990
990
  {
1133
1133
    return(true);
1134
1134
  }
1135
1135
 
1136
 
  thd_proc_info(thd, "Changing master");
 
1136
  thd->set_proc_info("Changing master");
1137
1137
  LEX_MASTER_INFO* lex_mi= &thd->lex->mi;
1138
1138
  // TODO: see if needs re-write
1139
1139
  if (mi->init_master_info(master_info_file, relay_log_info_file, 0, thread_mask))
1237
1237
  if (need_relay_log_purge)
1238
1238
  {
1239
1239
    relay_log_purge= 1;
1240
 
    thd_proc_info(thd, "Purging old relay logs");
 
1240
    thd->set_proc_info("Purging old relay logs");
1241
1241
    if (purge_relay_logs(&mi->rli, thd,
1242
1242
                         0 /* not only reset, but also reinit */,
1243
1243
                         &errmsg))
1296
1296
  pthread_mutex_unlock(&mi->rli.data_lock);
1297
1297
 
1298
1298
  unlock_slave_threads(mi);
1299
 
  thd_proc_info(thd, 0);
 
1299
  thd->set_proc_info(0);
1300
1300
  my_ok(thd);
1301
1301
  return(false);
1302
1302
}