summaryrefslogtreecommitdiff
path: root/client/mysqlbinlog.cc
diff options
context:
space:
mode:
authorserg@sergbook.mysql.com <>2007-03-23 16:29:38 +0200
committerserg@sergbook.mysql.com <>2007-03-23 16:29:38 +0200
commit37e7a07465a4a255f843e1d24779cf84af7f04d0 (patch)
tree34d0805aee46340944a849cc48b8c09cfd948cf3 /client/mysqlbinlog.cc
parent30c8ec9fdcea771ce7732d6b9ed99371e0921b7b (diff)
parent25b49e99cd9fc7e01a94b7350cc7e9e89c882647 (diff)
downloadmariadb-git-37e7a07465a4a255f843e1d24779cf84af7f04d0.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.0-marvel
into sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.0
Diffstat (limited to 'client/mysqlbinlog.cc')
-rw-r--r--client/mysqlbinlog.cc15
1 files changed, 11 insertions, 4 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index 91fb5f2b99d..7340e3eb7a1 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -1044,7 +1044,7 @@ static int dump_remote_log_entries(PRINT_EVENT_INFO *print_event_info,
uint logname_len;
NET* net;
int error= 0;
- my_off_t old_off= start_position_mot;
+ my_off_t old_off= min(start_position_mot, BIN_LOG_HEADER_SIZE);
char fname[FN_REFLEN+1];
DBUG_ENTER("dump_remote_log_entries");
@@ -1196,10 +1196,17 @@ could be out of memory");
}
}
/*
- Let's adjust offset for remote log as for local log to produce
- similar text.
+ Let's adjust offset for remote log as for local log to produce
+ similar text and to have --stop-position to work identically.
+
+ Exception - the server sends Format_description_log_event
+ in the beginning of the dump, and only after it the event from
+ start_position. Let the old_off reflect it.
*/
- old_off+= len-1;
+ if (old_off < start_position_mot)
+ old_off= start_position_mot;
+ else
+ old_off+= len-1;
}
err: