Commit c862c15b authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: [partial] removal of llstr()

now when my_vsnprintf() supports %llu for a few years already.
parent fff6f427
......@@ -4281,12 +4281,9 @@ int MYSQL_BIN_LOG::purge_first_log(Relay_log_info* rli, bool included)
if((error=find_log_pos(&rli->linfo, rli->event_relay_log_name, 0)) ||
(error=find_next_log(&rli->linfo, 0)))
{
char buff[22];
sql_print_error("next log error: %d offset: %s log: %s included: %d",
error,
llstr(rli->linfo.index_file_offset,buff),
rli->event_relay_log_name,
included);
sql_print_error("next log error: %d offset: %llu log: %s included: %d",
error, rli->linfo.index_file_offset,
rli->event_relay_log_name, included);
goto err;
}
......@@ -4327,12 +4324,9 @@ int MYSQL_BIN_LOG::purge_first_log(Relay_log_info* rli, bool included)
*/
if((error=find_log_pos(&rli->linfo, rli->event_relay_log_name, 0)))
{
char buff[22];
sql_print_error("next log error: %d offset: %s log: %s included: %d",
error,
llstr(rli->linfo.index_file_offset,buff),
rli->group_relay_log_name,
included);
sql_print_error("next log error: %d offset: %llu log: %s included: %d",
error, rli->linfo.index_file_offset,
rli->group_relay_log_name, included);
goto err;
}
......
......@@ -3388,14 +3388,10 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
break;
case Q_SQL_MODE_CODE:
{
#ifndef DBUG_OFF
char buff[22];
#endif
CHECK_SPACE(pos, end, 8);
sql_mode_inited= 1;
sql_mode= (ulong) uint8korr(pos); // QQ: Fix when sql_mode is ulonglong
DBUG_PRINT("info",("In Query_log_event, read sql_mode: %s",
llstr(sql_mode, buff)));
DBUG_PRINT("info",("In Query_log_event, read sql_mode: %llu", sql_mode));
pos+= 8;
break;
}
......@@ -5787,7 +5783,6 @@ int Load_log_event::do_apply_event(NET* net, rpl_group_info *rgi,
}
else
{
char llbuff[22];
enum enum_duplicates handle_dup;
bool ignore= 0;
char query_buffer[1024];
......@@ -5888,10 +5883,9 @@ int Load_log_event::do_apply_event(NET* net, rpl_group_info *rgi,
{
/* log_pos is the position of the LOAD event in the master log */
sql_print_warning("Slave: load data infile on table '%s' at "
"log position %s in log '%s' produced %ld "
"log position %llu in log '%s' produced %ld "
"warning(s). Default database: '%s'",
(char*) table_name,
llstr(log_pos,llbuff), RPL_LOG_NAME,
(char*) table_name, log_pos, RPL_LOG_NAME,
(ulong) thd->cuted_fields,
print_slave_db_safe(thd->db));
}
......@@ -5999,12 +5993,11 @@ Error '%s' running LOAD DATA INFILE on table '%s'. Default database: '%s'",
#if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT)
void Rotate_log_event::pack_info(THD *thd, Protocol *protocol)
{
char buf1[256], buf[22];
String tmp(buf1, sizeof(buf1), log_cs);
StringBuffer<256> tmp(log_cs);
tmp.length(0);
tmp.append(new_log_ident, ident_len);
tmp.append(STRING_WITH_LEN(";pos="));
tmp.append(llstr(pos,buf));
tmp.append_ulonglong(pos);
protocol->store(tmp.ptr(), tmp.length(), &my_charset_bin);
}
#endif
......
......@@ -395,24 +395,16 @@ Failed to open the existing relay log info file '%s' (errno %d)",
0 /* no data lock*/,
&msg, 0))
{
char llbuf[22];
sql_print_error("Failed to open the relay log '%s' (relay_log_pos %s)",
rli->group_relay_log_name,
llstr(rli->group_relay_log_pos, llbuf));
sql_print_error("Failed to open the relay log '%s' (relay_log_pos %llu)",
rli->group_relay_log_name, rli->group_relay_log_pos);
goto err;
}
}
#ifndef DBUG_OFF
{
char llbuf1[22], llbuf2[22];
DBUG_PRINT("info", ("my_b_tell(rli->cur_log)=%s rli->event_relay_log_pos=%s",
llstr(my_b_tell(rli->cur_log),llbuf1),
llstr(rli->event_relay_log_pos,llbuf2)));
DBUG_ASSERT(rli->event_relay_log_pos >= BIN_LOG_HEADER_SIZE);
DBUG_ASSERT(my_b_tell(rli->cur_log) == rli->event_relay_log_pos);
}
#endif
DBUG_PRINT("info", ("my_b_tell(rli->cur_log)=%llu rli->event_relay_log_pos=%llu",
my_b_tell(rli->cur_log), rli->event_relay_log_pos));
DBUG_ASSERT(rli->event_relay_log_pos >= BIN_LOG_HEADER_SIZE);
DBUG_ASSERT(my_b_tell(rli->cur_log) == rli->event_relay_log_pos);
/*
Now change the cache from READ to WRITE - must do this
......@@ -457,10 +449,7 @@ static inline int add_relay_log(Relay_log_info* rli,LOG_INFO* linfo)
DBUG_RETURN(1);
}
rli->log_space_total += s.st_size;
#ifndef DBUG_OFF
char buf[22];
DBUG_PRINT("info",("log_space_total: %s", llstr(rli->log_space_total,buf)));
#endif
DBUG_PRINT("info",("log_space_total: %llu", rli->log_space_total));
DBUG_RETURN(0);
}
......@@ -725,14 +714,8 @@ int init_relay_log_pos(Relay_log_info* rli,const char* log,
rli->relay_log.description_event_for_exec= fdev;
}
my_b_seek(rli->cur_log,(off_t)pos);
#ifndef DBUG_OFF
{
char llbuf1[22], llbuf2[22];
DBUG_PRINT("info", ("my_b_tell(rli->cur_log)=%s rli->event_relay_log_pos=%s",
llstr(my_b_tell(rli->cur_log),llbuf1),
llstr(rli->event_relay_log_pos,llbuf2)));
}
#endif
DBUG_PRINT("info", ("my_b_tell(rli->cur_log)=%llu rli->event_relay_log_pos=%llu",
my_b_tell(rli->cur_log), rli->event_relay_log_pos));
}
......@@ -1165,10 +1148,7 @@ int purge_relay_logs(Relay_log_info* rli, THD *thd, bool just_reset,
}
err:
#ifndef DBUG_OFF
char buf[22];
#endif
DBUG_PRINT("info",("log_space_total: %s",llstr(rli->log_space_total,buf)));
DBUG_PRINT("info",("log_space_total: %llu",rli->log_space_total));
mysql_mutex_unlock(&rli->data_lock);
DBUG_RETURN(error);
}
......@@ -1225,21 +1205,16 @@ bool Relay_log_info::is_until_satisfied(my_off_t master_beg_pos)
log_pos= group_relay_log_pos;
}
#ifndef DBUG_OFF
{
char buf[32];
DBUG_PRINT("info", ("group_master_log_name='%s', group_master_log_pos=%s",
group_master_log_name, llstr(group_master_log_pos, buf)));
DBUG_PRINT("info", ("group_relay_log_name='%s', group_relay_log_pos=%s",
group_relay_log_name, llstr(group_relay_log_pos, buf)));
DBUG_PRINT("info", ("(%s) log_name='%s', log_pos=%s",
until_condition == UNTIL_MASTER_POS ? "master" : "relay",
log_name, llstr(log_pos, buf)));
DBUG_PRINT("info", ("(%s) until_log_name='%s', until_log_pos=%s",
until_condition == UNTIL_MASTER_POS ? "master" : "relay",
until_log_name, llstr(until_log_pos, buf)));
}
#endif
DBUG_PRINT("info", ("group_master_log_name='%s', group_master_log_pos=%llu",
group_master_log_name, group_master_log_pos));
DBUG_PRINT("info", ("group_relay_log_name='%s', group_relay_log_pos=%llu",
group_relay_log_name, group_relay_log_pos));
DBUG_PRINT("info", ("(%s) log_name='%s', log_pos=%llu",
until_condition == UNTIL_MASTER_POS ? "master" : "relay",
log_name, log_pos));
DBUG_PRINT("info", ("(%s) until_log_name='%s', until_log_pos=%llu",
until_condition == UNTIL_MASTER_POS ? "master" : "relay",
until_log_name, until_log_pos));
if (until_log_names_cmp_result == UNTIL_LOG_NAMES_CMP_UNKNOWN)
{
......
......@@ -121,7 +121,7 @@ static const char *reconnect_messages[SLAVE_RECON_ACT_MAX][SLAVE_RECON_MSG_MAX]=
registration on master",
"Reconnecting after a failed registration on master",
"failed registering on master, reconnecting to try again, \
log '%s' at position %s%s",
log '%s' at position %llu%s",
"COM_REGISTER_SLAVE",
"Slave I/O thread killed during or after reconnect"
},
......@@ -129,7 +129,7 @@ log '%s' at position %s%s",
"Waiting to reconnect after a failed binlog dump request",
"Slave I/O thread killed while retrying master dump",
"Reconnecting after a failed binlog dump request",
"failed dump request, reconnecting to try again, log '%s' at position %s%s",
"failed dump request, reconnecting to try again, log '%s' at position %llu%s",
"COM_BINLOG_DUMP",
"Slave I/O thread killed during or after reconnect"
},
......@@ -138,7 +138,7 @@ log '%s' at position %s%s",
"Slave I/O thread killed while waiting to reconnect after a failed read",
"Reconnecting after a failed master event read",
"Slave I/O thread: Failed reading log event, reconnecting to retry, \
log '%s' at position %s%s",
log '%s' at position %llu%s",
"",
"Slave I/O thread killed during or after a reconnect done to recover from \
failed read"
......@@ -1772,14 +1772,13 @@ when it try to get the value of TIME_ZONE global variable from master.";
if (mi->heartbeat_period != 0.0)
{
char llbuf[22];
const char query_format[]= "SET @master_heartbeat_period= %s";
char query[sizeof(query_format) - 2 + sizeof(llbuf)];
const char query_format[]= "SET @master_heartbeat_period= %llu";
char query[sizeof(query_format) + 32];
/*
the period is an ulonglong of nano-secs.
*/
llstr((ulonglong) (mi->heartbeat_period*1000000000UL), llbuf);
sprintf(query, query_format, llbuf);
my_snprintf(query, sizeof(query), query_format,
(ulonglong) (mi->heartbeat_period*1000000000UL));
DBUG_EXECUTE_IF("simulate_slave_heartbeat_network_error",
{ static ulong dbug_count= 0;
......@@ -2298,13 +2297,10 @@ static bool wait_for_relay_log_space(Relay_log_info* rli)
{
#ifndef DBUG_OFF
{
char llbuf1[22], llbuf2[22];
DBUG_PRINT("info", ("log_space_limit=%s "
"log_space_total=%s "
DBUG_PRINT("info", ("log_space_limit=%llu log_space_total=%llu "
"ignore_log_space_limit=%d "
"sql_force_rotate_relay=%d",
llstr(rli->log_space_limit,llbuf1),
llstr(rli->log_space_total,llbuf2),
rli->log_space_limit, rli->log_space_total,
(int) rli->ignore_log_space_limit,
(int) rli->sql_force_rotate_relay));
}
......@@ -2744,8 +2740,7 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full,
String *packet= &thd->packet;
Protocol *protocol= thd->protocol;
Rpl_filter *rpl_filter= mi->rpl_filter;
char buf[256];
String tmp(buf, sizeof(buf), &my_charset_bin);
StringBuffer<256> tmp;
protocol->prepare_for_resend();
......@@ -2901,9 +2896,8 @@ static bool send_show_master_info_data(THD *thd, Master_info *mi, bool full,
protocol->store(mi->using_gtid_astext(mi->using_gtid), &my_charset_bin);
// Gtid_IO_Pos
{
String tmp2(buf, sizeof(buf), system_charset_info);
mi->gtid_current_pos.to_string(&tmp2);
protocol->store(tmp2.ptr(), tmp2.length(), &my_charset_bin);
mi->gtid_current_pos.to_string(&tmp);
protocol->store(tmp.ptr(), tmp.length(), &my_charset_bin);
}
// Replicate_Do_Domain_Ids & Replicate_Ignore_Domain_Ids
......@@ -3410,15 +3404,10 @@ int apply_event_and_update_pos(Log_event* ev, THD* thd,
if (!rli->is_fake)
#endif
{
#ifndef DBUG_OFF
char buf[22];
#endif
DBUG_PRINT("info", ("update_pos error = %d", error));
DBUG_PRINT("info", ("group %s %s",
llstr(rli->group_relay_log_pos, buf),
DBUG_PRINT("info", ("group %llu %s", rli->group_relay_log_pos,
rli->group_relay_log_name));
DBUG_PRINT("info", ("event %s %s",
llstr(rli->event_relay_log_pos, buf),
DBUG_PRINT("info", ("event %llu %s", rli->event_relay_log_pos,
rli->event_relay_log_name));
}
/*
......@@ -3430,14 +3419,12 @@ int apply_event_and_update_pos(Log_event* ev, THD* thd,
*/
if (error)
{
char buf[22];
rli->report(ERROR_LEVEL, ER_UNKNOWN_ERROR, rgi->gtid_info(),
"It was not possible to update the positions"
" of the relay log information: the slave may"
" be in an inconsistent state."
" Stopped in %s position %s",
rli->group_relay_log_name,
llstr(rli->group_relay_log_pos, buf));
" Stopped in %s position %llu",
rli->group_relay_log_name, rli->group_relay_log_pos);
DBUG_RETURN(2);
}
}
......@@ -3610,9 +3597,8 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli,
? rli->group_master_log_pos
: ev->log_pos - ev->data_written))
{
char buf[22];
sql_print_information("Slave SQL thread stopped because it reached its"
" UNTIL position %s", llstr(rli->until_pos(), buf));
" UNTIL position %llu", rli->until_pos());
/*
Setting abort_slave flag because we do not want additional
message about error in query execution to be printed.
......@@ -3859,8 +3845,8 @@ static int try_to_reconnect(THD *thd, MYSQL *mysql, Master_info *mi,
thd->proc_info = messages[SLAVE_RECON_MSG_AFTER];
if (!suppress_warnings)
{
char buf[256], llbuff[22];
String tmp;
char buf[256];
StringBuffer<100> tmp;
if (mi->using_gtid != Master_info::USE_GTID_NO)
{
tmp.append(STRING_WITH_LEN("; GTID position '"));
......@@ -3874,7 +3860,7 @@ static int try_to_reconnect(THD *thd, MYSQL *mysql, Master_info *mi,
}
}
my_snprintf(buf, sizeof(buf), messages[SLAVE_RECON_MSG_FAILED],
IO_RPL_LOG_NAME, llstr(mi->master_log_pos, llbuff),
IO_RPL_LOG_NAME, mi->master_log_pos,
tmp.c_ptr_safe());
/*
Raise a warining during registering on master/requesting dump.
......@@ -3915,7 +3901,6 @@ pthread_handler_t handle_slave_io(void *arg)
MYSQL *mysql;
Master_info *mi = (Master_info*)arg;
Relay_log_info *rli= &mi->rli;
char llbuff[22];
uint retry_count;
bool suppress_warnings;
int ret;
......@@ -3962,9 +3947,8 @@ pthread_handler_t handle_slave_io(void *arg)
mysql_mutex_unlock(&mi->run_lock);
mysql_cond_broadcast(&mi->start_cond);
DBUG_PRINT("master_info",("log_file_name: '%s' position: %s",
mi->master_log_name,
llstr(mi->master_log_pos,llbuff)));
DBUG_PRINT("master_info",("log_file_name: '%s' position: %llu",
mi->master_log_name, mi->master_log_pos));
/* This must be called before run any binlog_relay_io hooks */
my_pthread_setspecific_ptr(RPL_MASTER_INFO, mi);
......@@ -4007,13 +3991,12 @@ pthread_handler_t handle_slave_io(void *arg)
{
if (mi->using_gtid == Master_info::USE_GTID_NO)
sql_print_information("Slave I/O thread: connected to master '%s@%s:%d',"
"replication started in log '%s' at position %s",
"replication started in log '%s' at position %llu",
mi->user, mi->host, mi->port,
IO_RPL_LOG_NAME,
llstr(mi->master_log_pos,llbuff));
IO_RPL_LOG_NAME, mi->master_log_pos);
else
{
String tmp;
StringBuffer<100> tmp;
mi->gtid_current_pos.to_string(&tmp);
sql_print_information("Slave I/O thread: connected to master '%s@%s:%d',"
"replication starts at GTID position '%s'",
......@@ -4070,7 +4053,7 @@ connected:
if (ret == 2)
{
if (check_io_slave_killed(mi, "Slave I/O thread killed"
if (check_io_slave_killed(mi, "Slave I/O thread killed "
"while calling get_master_version_and_clock(...)"))
goto err;
suppress_warnings= FALSE;
......@@ -4224,11 +4207,9 @@ Stopping slave I/O thread due to out-of-memory error from master");
*/
#ifndef DBUG_OFF
{
char llbuf1[22], llbuf2[22];
DBUG_PRINT("info", ("log_space_limit=%s log_space_total=%s \
ignore_log_space_limit=%d",
llstr(rli->log_space_limit,llbuf1),
llstr(rli->log_space_total,llbuf2),
DBUG_PRINT("info", ("log_space_limit=%llu log_space_total=%llu "
"ignore_log_space_limit=%d",
rli->log_space_limit, rli->log_space_total,
(int) rli->ignore_log_space_limit));
}
#endif
......@@ -4250,15 +4231,14 @@ err:
// print the current replication position
if (mi->using_gtid == Master_info::USE_GTID_NO)
sql_print_information("Slave I/O thread exiting, read up to log '%s', "
"position %s",
IO_RPL_LOG_NAME, llstr(mi->master_log_pos,llbuff));
"position %llu", IO_RPL_LOG_NAME, mi->master_log_pos);
else
{
String tmp;
StringBuffer<100> tmp;
mi->gtid_current_pos.to_string(&tmp);
sql_print_information("Slave I/O thread exiting, read up to log '%s', "
"position %s; GTID position %s",
IO_RPL_LOG_NAME, llstr(mi->master_log_pos,llbuff),
"position %llu; GTID position %s",
IO_RPL_LOG_NAME, mi->master_log_pos,
tmp.c_ptr_safe());
}
RUN_HOOK(binlog_relay_io, thread_stop, (thd, mi));
......@@ -4398,7 +4378,6 @@ slave_output_error_info(rpl_group_info *rgi, THD *thd)
*/
Relay_log_info *rli= rgi->rli;
uint32 const last_errno= rli->last_error().number;
char llbuff[22];
if (thd->is_error())
{
......@@ -4446,7 +4425,7 @@ slave_output_error_info(rpl_group_info *rgi, THD *thd)
}
if (udf_error)
{
String tmp;
StringBuffer<100> tmp;
if (rli->mi->using_gtid != Master_info::USE_GTID_NO)
{
tmp.append(STRING_WITH_LEN("; GTID position '"));
......@@ -4456,22 +4435,22 @@ slave_output_error_info(rpl_group_info *rgi, THD *thd)
sql_print_error("Error loading user-defined library, slave SQL "
"thread aborted. Install the missing library, and restart the "
"slave SQL thread with \"SLAVE START\". We stopped at log '%s' "
"position %s%s", RPL_LOG_NAME, llstr(rli->group_master_log_pos,
llbuff), tmp.c_ptr_safe());
"position %llu%s", RPL_LOG_NAME, rli->group_master_log_pos,
tmp.c_ptr_safe());
}
else
{
String tmp;
StringBuffer<100> tmp;
if (rli->mi->using_gtid != Master_info::USE_GTID_NO)
{
tmp.append(STRING_WITH_LEN("; GTID position '"));
rpl_append_gtid_state(&tmp, false);
tmp.append(STRING_WITH_LEN("'"));
}
sql_print_error("\
Error running query, slave SQL thread aborted. Fix the problem, and restart \
the slave SQL thread with \"SLAVE START\". We stopped at log \
'%s' position %s%s", RPL_LOG_NAME, llstr(rli->group_master_log_pos, llbuff),
sql_print_error("Error running query, slave SQL thread aborted. "
"Fix the problem, and restart the slave SQL thread "
"with \"SLAVE START\". We stopped at log '%s' position "
"%llu%s", RPL_LOG_NAME, rli->group_master_log_pos,
tmp.c_ptr_safe());
}
}
......@@ -4488,7 +4467,6 @@ the slave SQL thread with \"SLAVE START\". We stopped at log \
pthread_handler_t handle_slave_sql(void *arg)
{
THD *thd; /* needs to be first for thread_stack */
char llbuff[22],llbuff1[22];
char saved_log_name[FN_REFLEN];
char saved_master_log_name[FN_REFLEN];
my_off_t UNINIT_VAR(saved_log_pos);
......@@ -4625,10 +4603,9 @@ pthread_handler_t handle_slave_sql(void *arg)
THD_CHECK_SENTRY(thd);
#ifndef DBUG_OFF
{
char llbuf1[22], llbuf2[22];
DBUG_PRINT("info", ("my_b_tell(rli->cur_log)=%s rli->event_relay_log_pos=%s",
llstr(my_b_tell(rli->cur_log),llbuf1),
llstr(rli->event_relay_log_pos,llbuf2)));
DBUG_PRINT("info", ("my_b_tell(rli->cur_log)=%llu "
"rli->event_relay_log_pos=%llu",
my_b_tell(rli->cur_log), rli->event_relay_log_pos));
DBUG_ASSERT(rli->event_relay_log_pos >= BIN_LOG_HEADER_SIZE);
/*
Wonder if this is correct. I (Guilhem) wonder if my_b_tell() returns the
......@@ -4654,12 +4631,12 @@ pthread_handler_t handle_slave_sql(void *arg)
if (WSREP_ON)
wsrep_ready_wait();
#endif
DBUG_PRINT("master_info",("log_file_name: %s position: %s",
DBUG_PRINT("master_info",("log_file_name: %s position: %llu",
rli->group_master_log_name,
llstr(rli->group_master_log_pos,llbuff)));
rli->group_master_log_pos));
if (global_system_variables.log_warnings)
{
String tmp;
StringBuffer<100> tmp;
if (mi->using_gtid != Master_info::USE_GTID_NO)
{
tmp.append(STRING_WITH_LEN("; GTID position '"));
......@@ -4667,10 +4644,11 @@ pthread_handler_t handle_slave_sql(void *arg)
mi->using_gtid==Master_info::USE_GTID_CURRENT_POS);
tmp.append(STRING_WITH_LEN("'"));
}
sql_print_information("Slave SQL thread initialized, starting replication in \
log '%s' at position %s, relay log '%s' position: %s%s", RPL_LOG_NAME,
llstr(rli->group_master_log_pos,llbuff),rli->group_relay_log_name,
llstr(rli->group_relay_log_pos,llbuff1), tmp.c_ptr_safe());
sql_print_information("Slave SQL thread initialized, starting replication "
"in log '%s' at position %llu, relay log '%s' "
"position: %llu%s", RPL_LOG_NAME,
rli->group_master_log_pos, rli->group_relay_log_name,
rli->group_relay_log_pos, tmp.c_ptr_safe());
}
if (check_temp_dir(rli->slave_patternload_file))
......@@ -4732,9 +4710,8 @@ log '%s' at position %s, relay log '%s' position: %s%s", RPL_LOG_NAME,
rli->until_condition == Relay_log_info::UNTIL_RELAY_POS) &&
rli->is_until_satisfied(rli->group_master_log_pos))
{
char buf[22];
sql_print_information("Slave SQL thread stopped because it reached its"
" UNTIL position %s", llstr(rli->until_pos(), buf));
" UNTIL position %llu", rli->until_pos());
mysql_mutex_unlock(&rli->data_lock);
goto err;
}
......@@ -4749,7 +4726,7 @@ log '%s' at position %s, relay log '%s' position: %s%s", RPL_LOG_NAME,
if (saved_skip && rli->slave_skip_counter == 0)
{
String tmp;
StringBuffer<100> tmp;
if (mi->using_gtid != Master_info::USE_GTID_NO)
{
tmp.append(STRING_WITH_LEN(", GTID '"));
......@@ -4793,7 +4770,7 @@ log '%s' at position %s, relay log '%s' position: %s%s", RPL_LOG_NAME,
/* Thread stopped. Print the current replication position to the log */
{
String tmp;
StringBuffer<100> tmp;
if (mi->using_gtid != Master_info::USE_GTID_NO)
{
tmp.append(STRING_WITH_LEN("; GTID position '"));
......@@ -4801,10 +4778,8 @@ log '%s' at position %s, relay log '%s' position: %s%s", RPL_LOG_NAME,
tmp.append(STRING_WITH_LEN("'"));
}
sql_print_information("Slave SQL thread exiting, replication stopped in "
"log '%s' at position %s%s",
RPL_LOG_NAME,
llstr(rli->group_master_log_pos,llbuff),
tmp.c_ptr_safe());
"log '%s' at position %llu%s", RPL_LOG_NAME,
rli->group_master_log_pos, tmp.c_ptr_safe());
}
err:
......@@ -5365,7 +5340,7 @@ static int queue_old_event(Master_info *mi, const char *buf,
static int queue_event(Master_info* mi,const char* buf, ulong event_len)
{
int error= 0;
String error_msg;
StringBuffer<1024> error_msg;
ulonglong inc_pos;
ulonglong event_pos;
Relay_log_info *rli= &mi->rli;
......@@ -5673,7 +5648,6 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len)
/*
HB (heartbeat) cannot come before RL (Relay)
*/
char llbuf[22];
Heartbeat_log_event hb(buf,
mi->rli.relay_log.relay_log_checksum_alg
!= BINLOG_CHECKSUM_ALG_OFF ?
......@@ -5686,8 +5660,7 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len)
error_msg.append(STRING_WITH_LEN("the event's data: log_file_name "));
error_msg.append(hb.get_log_ident(), (uint) strlen(hb.get_log_ident()));
error_msg.append(STRING_WITH_LEN(" log_pos "));
llstr(hb.log_pos, llbuf);
error_msg.append(llbuf, strlen(llbuf));
error_msg.append_ulonglong(hb.log_pos);
goto err;
}
mi->received_heartbeats++;
......@@ -5715,8 +5688,7 @@ static int queue_event(Master_info* mi,const char* buf, ulong event_len)
error_msg.append(STRING_WITH_LEN("the event's data: log_file_name "));
error_msg.append(hb.get_log_ident(), (uint) strlen(hb.get_log_ident()));
error_msg.append(STRING_WITH_LEN(" log_pos "));
llstr(hb.log_pos, llbuf);
error_msg.append(llbuf, strlen(llbuf));
error_msg.append_ulonglong(hb.log_pos);
goto err;
}
goto skip_relay_logging;
......@@ -6205,7 +6177,6 @@ static int connect_to_master(THD* thd, MYSQL* mysql, Master_info* mi,
int slave_was_killed;
int last_errno= -2; // impossible error
ulong err_count=0;
char llbuff[22];
my_bool my_true= 1;
DBUG_ENTER("connect_to_master");
set_slave_max_allowed_packet(thd, mysql);
......@@ -6313,11 +6284,10 @@ static int connect_to_master(THD* thd, MYSQL* mysql, Master_info* mi,
if (reconnect)
{
if (!suppress_warnings && global_system_variables.log_warnings)
sql_print_information("Slave: connected to master '%s@%s:%d',\
replication resumed in log '%s' at position %s", mi->user,
mi->host, mi->port,
IO_RPL_LOG_NAME,
llstr(mi->master_log_pos,llbuff));
sql_print_information("Slave: connected to master '%s@%s:%d',"
"replication resumed in log '%s' at "
"position %llu", mi->user, mi->host, mi->port,
IO_RPL_LOG_NAME, mi->master_log_pos);
}
else
{
......@@ -6600,10 +6570,8 @@ static Log_event* next_event(rpl_group_info *rgi, ulonglong *event_size)
#ifndef DBUG_OFF
{
/* This is an assertion which sometimes fails, let's try to track it */
char llbuf1[22], llbuf2[22];
DBUG_PRINT("info", ("my_b_tell(cur_log)=%s rli->event_relay_log_pos=%s",
llstr(my_b_tell(cur_log),llbuf1),
llstr(rli->event_relay_log_pos,llbuf2)));
DBUG_PRINT("info", ("my_b_tell(cur_log)=%llu rli->event_relay_log_pos=%llu",
my_b_tell(cur_log), rli->event_relay_log_pos));
DBUG_ASSERT(my_b_tell(cur_log) >= BIN_LOG_HEADER_SIZE);
DBUG_ASSERT(rli->mi->using_parallel() ||
my_b_tell(cur_log) == rli->event_relay_log_pos);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment