diff options
author | Andrei Elkin <andrei.elkin@oracle.com> | 2012-01-19 16:44:09 +0200 |
---|---|---|
committer | Andrei Elkin <andrei.elkin@oracle.com> | 2012-01-19 16:44:09 +0200 |
commit | a7f1c7d9556e23373cb453748d7cef8f8c27ced8 (patch) | |
tree | 3e79f37aaa1e0b87575e2ecd0330488bb948ce85 /sql/sql_repl.cc | |
parent | 4cef3cee0061cf37c01e58114b5cdbe5fa7f1df6 (diff) | |
download | mariadb-git-a7f1c7d9556e23373cb453748d7cef8f8c27ced8.tar.gz |
bug#3593869-64035
A follow-up patch corrects max sizes of printed strings and changes llstr() to %lld.
Credits go to Davi who provided a great feedback.
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r-- | sql/sql_repl.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 605acc1f393..511c5581dae 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -447,7 +447,6 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos, String* packet = &thd->packet; int error; const char *errmsg = "Unknown error"; - char llbuff0[22], llbuff1[22], llbuff2[22]; char error_text[MAX_SLAVE_ERRMSG]; // to be send to slave via my_message() NET* net = &thd->net; mysql_mutex_t *log_lock; @@ -1034,12 +1033,14 @@ err: detailing the fatal error message with coordinates of the last position read. */ - const char *fmt= "%s; the start event position from '%s' at %s, the last event was read from '%s' at %s, the last byte read was read from '%s' at %s."; - my_snprintf(error_text, sizeof(error_text), fmt, errmsg, - p_start_coord->file_name, - (llstr(p_start_coord->pos, llbuff0), llbuff0), - p_coord->file_name, (llstr(p_coord->pos, llbuff1), llbuff1), - log_file_name, (llstr(my_b_tell(&log), llbuff2), llbuff2)); + my_snprintf(error_text, sizeof(error_text), + "%s; the first event '%s' at %lld, " + "the last event read from '%s' at %lld, " + "the last byte read from '%s' at %lld.", + errmsg, + p_start_coord->file_name, p_start_coord->pos, + p_coord->file_name, p_coord->pos, + log_file_name, my_b_tell(&log)); } else strcpy(error_text, errmsg); |