mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fix for BUG#3214 "mysqlbinlog --read-from-remote-server --position prints wrong positions"
I am fixing it here in 4.1, not in 4.0, as it goes with another change which I did in 4.1 (fix for BUG#3204 ""mysqlbinlog --read-from-remote-server this_binlog.001" prints all binlogs").
This commit is contained in:
@ -678,7 +678,7 @@ static int dump_remote_log_entries(const char* logname)
|
|||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
my_off_t old_off= 0;
|
my_off_t old_off= position;
|
||||||
ulonglong rec_count= 0;
|
ulonglong rec_count= 0;
|
||||||
char fname[FN_REFLEN+1];
|
char fname[FN_REFLEN+1];
|
||||||
|
|
||||||
@ -766,12 +766,10 @@ static int dump_remote_log_entries(const char* logname)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
Let's adjust offset for remote log as for local log to produce
|
Let's adjust offset for remote log as for local log to produce
|
||||||
similar text..
|
similar text. As we don't print the fake Rotate event, all events are
|
||||||
|
real so we can simply add the length.
|
||||||
*/
|
*/
|
||||||
if (old_off)
|
old_off+= len-1;
|
||||||
old_off+= len-1;
|
|
||||||
else
|
|
||||||
old_off= BIN_LOG_HEADER_SIZE;
|
|
||||||
}
|
}
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user