~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/slave.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:
1375
1375
  lex_start(thd);
1376
1376
 
1377
1377
  if (thd_type == SLAVE_THD_SQL)
1378
 
    thd_proc_info(thd, "Waiting for the next event in relay log");
 
1378
    thd->set_proc_info("Waiting for the next event in relay log");
1379
1379
  else
1380
 
    thd_proc_info(thd, "Waiting for master update");
 
1380
    thd->set_proc_info("Waiting for master update");
1381
1381
  thd->version=refresh_version;
1382
1382
  thd->set_time();
1383
1383
  return(0);
1967
1967
    goto err;
1968
1968
  }
1969
1969
 
1970
 
  thd_proc_info(thd, "Connecting to master");
 
1970
  thd->set_proc_info("Connecting to master");
1971
1971
  // we can get killed during safe_connect
1972
1972
  if (!safe_connect(thd, drizzle, mi))
1973
1973
  {
1994
1994
  // TODO: the assignment below should be under mutex (5.0)
1995
1995
  mi->slave_running= DRIZZLE_SLAVE_RUN_CONNECT;
1996
1996
  thd->slave_net = &drizzle->net;
1997
 
  thd_proc_info(thd, "Checking master version");
 
1997
  thd->set_proc_info("Checking master version");
1998
1998
  if (get_master_version_and_clock(drizzle, mi))
1999
1999
    goto err;
2000
2000
  
2003
2003
    /*
2004
2004
      Register ourselves with the master.
2005
2005
    */
2006
 
    thd_proc_info(thd, "Registering slave on master");
 
2006
    thd->set_proc_info("Registering slave on master");
2007
2007
    if (register_slave_on_master(drizzle, mi, &suppress_warnings))
2008
2008
    {
2009
2009
      if (!check_io_slave_killed(thd, mi, "Slave I/O thread killed "
2031
2031
 
2032
2032
  while (!io_slave_killed(thd,mi))
2033
2033
  {
2034
 
    thd_proc_info(thd, "Requesting binlog dump");
 
2034
    thd->set_proc_info("Requesting binlog dump");
2035
2035
    if (request_dump(drizzle, mi, &suppress_warnings))
2036
2036
    {
2037
2037
      sql_print_error(_("Failed on request_dump()"));
2061
2061
        important thing is to not confuse users by saying "reading" whereas
2062
2062
        we're in fact receiving nothing.
2063
2063
      */
2064
 
      thd_proc_info(thd, _("Waiting for master to send event"));
 
2064
      thd->set_proc_info(_("Waiting for master to send event"));
2065
2065
      event_len= read_event(drizzle, mi, &suppress_warnings);
2066
2066
      if (check_io_slave_killed(thd, mi, _("Slave I/O thread killed while "
2067
2067
                                           "reading event")))
2105
2105
      } // if (event_len == packet_error)
2106
2106
 
2107
2107
      retry_count=0;                    // ok event, reset retry counter
2108
 
      thd_proc_info(thd, _("Queueing master event to the relay log"));
 
2108
      thd->set_proc_info(_("Queueing master event to the relay log"));
2109
2109
      if (queue_event(mi,(const char*)drizzle->net.read_pos + 1, event_len))
2110
2110
      {
2111
2111
        goto err;
2163
2163
    mi->drizzle=0;
2164
2164
  }
2165
2165
  write_ignored_events_info_to_relay_log(thd, mi);
2166
 
  thd_proc_info(thd, _("Waiting for slave mutex on exit"));
 
2166
  thd->set_proc_info(_("Waiting for slave mutex on exit"));
2167
2167
  pthread_mutex_lock(&mi->run_lock);
2168
2168
 
2169
2169
  /* Forget the relay log's format */
2333
2333
 
2334
2334
  while (!sql_slave_killed(thd,rli))
2335
2335
  {
2336
 
    thd_proc_info(thd, _("Reading event from the relay log"));
 
2336
    thd->set_proc_info(_("Reading event from the relay log"));
2337
2337
    assert(rli->sql_thd == thd);
2338
2338
    THD_CHECK_SENTRY(thd);
2339
2339
    if (exec_relay_log_event(thd,rli))
2421
2421
  thd->query= thd->db= thd->catalog= 0;
2422
2422
  thd->query_length= thd->db_length= 0;
2423
2423
  pthread_mutex_unlock(&LOCK_thread_count);
2424
 
  thd_proc_info(thd, "Waiting for slave mutex on exit");
 
2424
  thd->set_proc_info("Waiting for slave mutex on exit");
2425
2425
  pthread_mutex_lock(&rli->run_lock);
2426
2426
  /* We need data_lock, at least to wake up any waiting master_pos_wait() */
2427
2427
  pthread_mutex_lock(&rli->data_lock);