summaryrefslogtreecommitdiff
path: root/client/mysqlbinlog.cc
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2004-07-17 16:58:16 +0200
committerunknown <guilhem@mysql.com>2004-07-17 16:58:16 +0200
commitcf8dbcc683b94b6e7f6c44d51b7241c45813decd (patch)
tree6860c440a1ea832c63bb4d8eb952e4e04d19a791 /client/mysqlbinlog.cc
parent2a64371e649666d54d66193bb52e4d430fe800b8 (diff)
downloadmariadb-git-cf8dbcc683b94b6e7f6c44d51b7241c45813decd.tar.gz
Fixes for
BUG#4506 "mysqlbinlog --position --read-from-remote-server has wrong "# at" lines", BUG#4553 "Multi-table DROP TABLE replicates improperly for nonexistent table" with a test file. It was not possible to add a test for BUG#4506 as in the test suite we must use --short-form which does not display the "# at" lines. client/mysqlbinlog.cc: Fix for BUG#4506 "mysqlbinlog --position --read-from-remote-server has wrong "# at" lines" when reading a remote binlog, the start position is not always BIN_LOG_HEADER_SIZE (4). sql/sql_table.cc: Fix for BUG#4553 "Multi-table DROP TABLE replicates improperly for nonexistent table" we must my_error() _before_ we write to the binlog, so that a meaningful error code is available in thd->net.last_errno for storage of the DROP TABLE statement into the binlog.
Diffstat (limited to 'client/mysqlbinlog.cc')
-rw-r--r--client/mysqlbinlog.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index 7bceedea4fe..7c3d22c4900 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -723,8 +723,8 @@ static int dump_remote_log_entries(const char* logname)
*/
if (old_off)
old_off+= len-1;
- else
- old_off= BIN_LOG_HEADER_SIZE;
+ else // first event, so it's a fake Rotate event
+ old_off= position;
}
return 0;
}