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)
{
......
This diff is collapsed.
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