mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
Fix for BUG#3401 "Rare replication bug which leads to "Binlog has bad magic number" from slave":
Backport of a part of this changeset of 4.1: ChangeSet@1.1753.1.1, 2004-04-05 13:56:05+03:00, monty@mysql.com which fixes the bug.
This commit is contained in:
parent
da6685fba5
commit
44a6fcba2f
1 changed files with 11 additions and 0 deletions
11
sql/slave.cc
11
sql/slave.cc
|
@ -1609,7 +1609,18 @@ int init_master_info(MASTER_INFO* mi, const char* master_info_fname,
|
|||
DBUG_ENTER("init_master_info");
|
||||
|
||||
if (mi->inited)
|
||||
{
|
||||
/*
|
||||
We have to reset read position of relay-log-bin as we may have
|
||||
already been reading from 'hotlog' when the slave was stopped
|
||||
last time. If this case pos_in_file would be set and we would
|
||||
get a crash when trying to read the signature for the binary
|
||||
relay log.
|
||||
*/
|
||||
my_b_seek(mi->rli.cur_log, (my_off_t) 0);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
mi->mysql=0;
|
||||
mi->file_id=1;
|
||||
mi->ignore_stop_event=0;
|
||||
|
|
Loading…
Reference in a new issue