summaryrefslogtreecommitdiff
path: root/sql/slave.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/slave.cc')
-rw-r--r--sql/slave.cc42
1 files changed, 21 insertions, 21 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index e8bdf655115..a50c74e4730 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -1575,8 +1575,8 @@ static int create_table_from_dump(THD* thd, MYSQL *mysql, const char* db,
/* Create the table. We do not want to log the "create table" statement */
save_options = thd->options;
- thd->options &= ~(ulong) (OPTION_BIN_LOG);
- thd->proc_info = "Creating table from master dump";
+ thd->options &= ~ (OPTION_BIN_LOG);
+ thd_proc_info(thd, "Creating table from master dump");
// save old db in case we are creating in a different database
save_db = thd->db;
save_db_length= thd->db_length;
@@ -1590,7 +1590,7 @@ static int create_table_from_dump(THD* thd, MYSQL *mysql, const char* db,
if (thd->query_error)
goto err; // mysql_parse took care of the error send
- thd->proc_info = "Opening master dump table";
+ thd_proc_info(thd, "Opening master dump table");
tables.lock_type = TL_WRITE;
if (!open_ltable(thd, &tables, TL_WRITE))
{
@@ -1599,7 +1599,7 @@ static int create_table_from_dump(THD* thd, MYSQL *mysql, const char* db,
}
file = tables.table->file;
- thd->proc_info = "Reading master dump table data";
+ thd_proc_info(thd, "Reading master dump table data");
/* Copy the data file */
if (file->net_read_dump(net))
{
@@ -1611,7 +1611,7 @@ static int create_table_from_dump(THD* thd, MYSQL *mysql, const char* db,
check_opt.init();
check_opt.flags|= T_VERY_SILENT | T_CALC_CHECKSUM | T_QUICK;
- thd->proc_info = "Rebuilding the index on master dump table";
+ thd_proc_info(thd, "Rebuilding the index on master dump table");
/*
We do not want repair() to spam us with messages
just send them to the error log, and report the failure in case of
@@ -2952,9 +2952,9 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
#endif
if (thd_type == SLAVE_THD_SQL)
- thd->proc_info= "Waiting for the next event in relay log";
+ thd_proc_info(thd, "Waiting for the next event in relay log");
else
- thd->proc_info= "Waiting for master update";
+ thd_proc_info(thd, "Waiting for master update");
thd->version=refresh_version;
thd->set_time();
DBUG_RETURN(0);
@@ -3366,7 +3366,7 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli)
}
DBUG_PRINT("info", ("thd->options: %s",
- (thd->options & OPTION_BEGIN) ? "OPTION_BEGIN" : ""))
+ (thd->options & OPTION_BEGIN) ? "OPTION_BEGIN" : ""));
/*
Protect against common user error of setting the counter to 1
@@ -3572,7 +3572,7 @@ slave_begin:
goto err;
}
- thd->proc_info = "Connecting to master";
+ thd_proc_info(thd, "Connecting to master");
// we can get killed during safe_connect
if (!safe_connect(thd, mysql, mi))
{
@@ -3599,7 +3599,7 @@ connected:
// TODO: the assignment below should be under mutex (5.0)
mi->slave_running= MYSQL_SLAVE_RUN_CONNECT;
thd->slave_net = &mysql->net;
- thd->proc_info = "Checking master version";
+ thd_proc_info(thd, "Checking master version");
if (get_master_version_and_clock(mysql, mi))
goto err;
@@ -3610,7 +3610,7 @@ connected:
If fails, this is not fatal - we just print the error message and go
on with life.
*/
- thd->proc_info = "Registering slave on master";
+ thd_proc_info(thd, "Registering slave on master");
if (register_slave_on_master(mysql))
goto err;
}
@@ -3619,7 +3619,7 @@ connected:
while (!io_slave_killed(thd,mi))
{
bool suppress_warnings= 0;
- thd->proc_info = "Requesting binlog dump";
+ thd_proc_info(thd, "Requesting binlog dump");
if (request_dump(mysql, mi, &suppress_warnings))
{
sql_print_error("Failed on request_dump()");
@@ -3631,7 +3631,7 @@ dump");
}
mi->slave_running= MYSQL_SLAVE_RUN_NOT_CONNECT;
- thd->proc_info= "Waiting to reconnect after a failed binlog dump request";
+ thd_proc_info(thd, "Waiting to reconnect after a failed binlog dump request");
#ifdef SIGNAL_WITH_VIO_CLOSE
thd->clear_active_vio();
#endif
@@ -3655,7 +3655,7 @@ dump");
goto err;
}
- thd->proc_info = "Reconnecting after a failed binlog dump request";
+ thd_proc_info(thd, "Reconnecting after a failed binlog dump request");
if (!suppress_warnings)
sql_print_error("Slave I/O thread: failed dump request, \
reconnecting to try again, log '%s' at postion %s", IO_RPL_LOG_NAME,
@@ -3682,7 +3682,7 @@ after reconnect");
important thing is to not confuse users by saying "reading" whereas
we're in fact receiving nothing.
*/
- thd->proc_info= "Waiting for master to send event";
+ thd_proc_info(thd, "Waiting for master to send event");
event_len= read_event(mysql, mi, &suppress_warnings);
if (io_slave_killed(thd,mi))
{
@@ -3713,7 +3713,7 @@ Stopping slave I/O thread due to out-of-memory error from master");
goto err;
}
mi->slave_running= MYSQL_SLAVE_RUN_NOT_CONNECT;
- thd->proc_info = "Waiting to reconnect after a failed master event read";
+ thd_proc_info(thd, "Waiting to reconnect after a failed master event read");
#ifdef SIGNAL_WITH_VIO_CLOSE
thd->clear_active_vio();
#endif
@@ -3732,7 +3732,7 @@ Stopping slave I/O thread due to out-of-memory error from master");
reconnect after a failed read");
goto err;
}
- thd->proc_info = "Reconnecting after a failed master event read";
+ thd_proc_info(thd, "Reconnecting after a failed master event read");
if (!suppress_warnings)
sql_print_information("Slave I/O thread: Failed reading log event, \
reconnecting to retry, log '%s' position %s", IO_RPL_LOG_NAME,
@@ -3749,7 +3749,7 @@ reconnect done to recover from failed read");
} // if (event_len == packet_error)
retry_count=0; // ok event, reset retry counter
- thd->proc_info = "Queueing master event to the relay log";
+ thd_proc_info(thd, "Queueing master event to the relay log");
if (queue_event(mi,(const char*)mysql->net.read_pos + 1,
event_len))
{
@@ -3831,7 +3831,7 @@ err:
mi->mysql=0;
}
write_ignored_events_info_to_relay_log(thd, mi);
- thd->proc_info = "Waiting for slave mutex on exit";
+ thd_proc_info(thd, "Waiting for slave mutex on exit");
pthread_mutex_lock(&mi->run_lock);
/* Forget the relay log's format */
@@ -4024,7 +4024,7 @@ Slave SQL thread aborted. Can't execute init_slave query");
while (!sql_slave_killed(thd,rli))
{
- thd->proc_info = "Reading event from the relay log";
+ thd_proc_info(thd, "Reading event from the relay log");
DBUG_ASSERT(rli->sql_thd == thd);
THD_CHECK_SENTRY(thd);
if (exec_relay_log_event(thd,rli))
@@ -4056,7 +4056,7 @@ the slave SQL thread with \"SLAVE START\". We stopped at log \
thd->query= 0;
thd->query_length= 0;
VOID(pthread_mutex_unlock(&LOCK_thread_count));
- thd->proc_info = "Waiting for slave mutex on exit";
+ thd_proc_info(thd, "Waiting for slave mutex on exit");
pthread_mutex_lock(&rli->run_lock);
/* We need data_lock, at least to wake up any waiting master_pos_wait() */
pthread_mutex_lock(&rli->data_lock);