diff options
author | unknown <guilhem@mysql.com> | 2004-03-18 20:53:33 +0200 |
---|---|---|
committer | unknown <guilhem@mysql.com> | 2004-03-18 20:53:33 +0200 |
commit | 1450ee3a670801b1e718bdfe55f5159dea055828 (patch) | |
tree | 55c8d4041225b2fcc5a8943fcc5cb4a8847397b1 /client | |
parent | a068b4a75506a23cc2381394745066e2891e288d (diff) | |
download | mariadb-git-1450ee3a670801b1e718bdfe55f5159dea055828.tar.gz |
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").
client/mysqlbinlog.cc:
correcting code to compute the position right when we are reading
a remote binlog.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysqlbinlog.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 52cdbe09e36..0f3260e903d 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -678,7 +678,7 @@ static int dump_remote_log_entries(const char* logname) DBUG_RETURN(1); } - my_off_t old_off= 0; + my_off_t old_off= position; ulonglong rec_count= 0; 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 - 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; - else - old_off= BIN_LOG_HEADER_SIZE; + old_off+= len-1; } DBUG_RETURN(0); } |