mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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. sql/share/errmsg-utf8.txt: Max size for the whole message is 512 so a part of - like '%-.512s' should be less, reduction to 320 is safe and with good chances won't cut off a part of a rather log message in Last_IO_Error = 'Got fatal error 1236 ...' sql/sql_repl.cc: llstr() is replaced by %lld.
This commit is contained in:
@ -179,7 +179,8 @@ DROP TABLE t1;
|
||||
sync_slave_with_master;
|
||||
|
||||
#
|
||||
# bug#3593869-64035 uninitialized event_coordinates instance crashes server
|
||||
# bug#3593869-64035 attempt to read a member of event_coordinates
|
||||
# referenced by NULL pointer crashes server.
|
||||
# Testing how out of valid range position value is handled with an error.
|
||||
#
|
||||
|
||||
|
@ -11,7 +11,7 @@ reset slave;
|
||||
start slave;
|
||||
include/wait_for_slave_param.inc [Last_IO_Errno]
|
||||
Last_IO_Errno = '1236'
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event; consider out of disk space on master; the start event position from '' at XXX, the last event was read from 'master-bin.000001' at XXX, the last byte read was read from 'master-bin.000001' at XXX.''
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event; consider out of disk space on master; the first event '' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.''
|
||||
reset master;
|
||||
stop slave;
|
||||
reset slave;
|
||||
|
@ -9,7 +9,7 @@ change master to master_log_pos=MASTER_LOG_POS;
|
||||
Read_Master_Log_Pos = '75'
|
||||
start slave;
|
||||
include/wait_for_slave_io_error.inc [errno=1236]
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the start event position from 'master-bin.000001' at XXX, the last event was read from 'master-bin.000001' at XXX, the last byte read was read from 'master-bin.000001' at XXX.''
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the first event 'master-bin.000001' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.''
|
||||
include/stop_slave_sql.inc
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
|
@ -5,7 +5,7 @@ CREATE TABLE t1(c1 INT);
|
||||
FLUSH LOGS;
|
||||
call mtr.add_suppression('Got fatal error 1236 from master when reading data from binary log: .*could not find next log');
|
||||
include/wait_for_slave_io_error.inc [errno=1236]
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'could not find next log; the start event position from 'master-bin.000001' at XXX, the last event was read from 'master-bin.000002' at XXX, the last byte read was read from 'master-bin.000002' at XXX.''
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'could not find next log; the first event 'master-bin.000001' at XXX, the last event read from 'master-bin.000002' at XXX, the last byte read from 'master-bin.000002' at XXX.''
|
||||
CREATE TABLE t2(c1 INT);
|
||||
FLUSH LOGS;
|
||||
CREATE TABLE t3(c1 INT);
|
||||
|
@ -37,7 +37,7 @@ DROP TABLE t1;
|
||||
CREATE TABLE t1 (f1 int PRIMARY KEY, f2 LONGTEXT, f3 LONGTEXT) ENGINE=MyISAM;
|
||||
INSERT INTO t1(f1, f2, f3) VALUES(1, REPEAT('a', @@global.max_allowed_packet), REPEAT('b', @@global.max_allowed_packet));
|
||||
include/wait_for_slave_io_error.inc [errno=1236]
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the start event position from '' at XXX, the last event was read from 'master-bin.000001' at XXX, the last byte read was read from 'master-bin.000001' at XXX.''
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the first event '' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.''
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
|
@ -75,7 +75,7 @@ CHANGE MASTER TO master_log_pos=MASTER_POS;
|
||||
START SLAVE;
|
||||
include/wait_for_slave_param.inc [Last_IO_Errno]
|
||||
Last_IO_Errno = '1236'
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the start event position from 'master-bin.000001' at XXX, the last event was read from 'master-bin.000001' at XXX, the last byte read was read from 'master-bin.000001' at XXX.''
|
||||
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the first event 'master-bin.000001' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.''
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
RESET MASTER;
|
||||
|
@ -4701,14 +4701,14 @@ ER_NOT_SUPPORTED_YET 42000
|
||||
spa "Esta versión de MySQL no soporta todavia '%s'"
|
||||
swe "Denna version av MySQL kan ännu inte utföra '%s'"
|
||||
ER_MASTER_FATAL_ERROR_READING_BINLOG
|
||||
nla "Kreeg fatale fout %d: '%-.512s' van master tijdens lezen van data uit binaire log"
|
||||
eng "Got fatal error %d from master when reading data from binary log: '%-.512s'"
|
||||
ger "Schwerer Fehler %d: '%-.512s vom Master beim Lesen des binären Logs"
|
||||
ita "Errore fatale %d: '%-.512s' dal master leggendo i dati dal log binario"
|
||||
por "Obteve fatal erro %d: '%-.512s' do master quando lendo dados do binary log"
|
||||
rus "Получена неисправимая ошибка %d: '%-.512s' от головного сервера в процессе выборки данных из двоичного журнала"
|
||||
spa "Recibió fatal error %d: '%-.512s' del master cuando leyendo datos del binary log"
|
||||
swe "Fick fatalt fel %d: '%-.512s' från master vid läsning av binärloggen"
|
||||
nla "Kreeg fatale fout %d: '%-.320s' van master tijdens lezen van data uit binaire log"
|
||||
eng "Got fatal error %d from master when reading data from binary log: '%-.320s'"
|
||||
ger "Schwerer Fehler %d: '%-.320s vom Master beim Lesen des binären Logs"
|
||||
ita "Errore fatale %d: '%-.320s' dal master leggendo i dati dal log binario"
|
||||
por "Obteve fatal erro %d: '%-.320s' do master quando lendo dados do binary log"
|
||||
rus "Получена неисправимая ошибка %d: '%-.320s' от головного сервера в процессе выборки данных из двоичного журнала"
|
||||
spa "Recibió fatal error %d: '%-.320s' del master cuando leyendo datos del binary log"
|
||||
swe "Fick fatalt fel %d: '%-.320s' från master vid läsning av binärloggen"
|
||||
ER_SLAVE_IGNORED_TABLE
|
||||
eng "Slave SQL thread ignored the query because of replicate-*-table rules"
|
||||
ger "Slave-SQL-Thread hat die Abfrage aufgrund von replicate-*-table-Regeln ignoriert"
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user