summaryrefslogtreecommitdiff
path: root/client/mysqlbinlog.cc
diff options
context:
space:
mode:
authorunknown <serg@sergbook.mysql.com>2007-03-23 17:56:58 +0200
committerunknown <serg@sergbook.mysql.com>2007-03-23 17:56:58 +0200
commit48d4d50c6eae8d565705f58ef07ac95f1720cdcf (patch)
treef346113a96a2cb894237c1d05bbd86496a6cc497 /client/mysqlbinlog.cc
parentc62c0d9df8a8ae3c531a17c09aa7b2c172c6966d (diff)
parentddb23beb88c05c2761aa9b31b74ee809370c0bc7 (diff)
downloadmariadb-git-48d4d50c6eae8d565705f58ef07ac95f1720cdcf.tar.gz
Merge sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.0-build
into sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.0 client/mysqlbinlog.cc: Auto merged sql/sql_view.cc: Auto merged mysql-test/r/view_grant.result: merged mysql-test/t/view_grant.test: merged
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 2a070d14f0d..1ab90e0eb6d 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -1042,7 +1042,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");
@@ -1194,10 +1194,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: