diff options
author | sasha@mysql.sashanet.com <> | 2000-08-23 13:27:33 -0600 |
---|---|---|
committer | sasha@mysql.sashanet.com <> | 2000-08-23 13:27:33 -0600 |
commit | 7da3818fdd252466c0967b24a3a63665d55ecd2a (patch) | |
tree | 3f55e8ba2a24b35f6a2e7955062c5a5673c2bd05 /sql/log_event.cc | |
parent | 0c46a399e2aac6ae6d38398779112b7952bf09ee (diff) | |
download | mariadb-git-7da3818fdd252466c0967b24a3a63665d55ecd2a.tar.gz |
Replication fixes
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index eae8d7c1e88..45a3e749e9e 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -23,9 +23,9 @@ #endif /* MYSQL_CLIENT */ #define LOG_EVENT_HEADER_LEN 9 -#define QUERY_HEADER_LEN (sizeof(uint) + sizeof(uint) + sizeof(uchar)) -#define LOAD_HEADER_LEN (sizeof(uint) + sizeof(uint) + \ - + sizeof(uint) + 2 + sizeof(uint)) +#define QUERY_HEADER_LEN (sizeof(uint32) + sizeof(uint32) + sizeof(uchar)) +#define LOAD_HEADER_LEN (sizeof(uint32) + sizeof(uint32) + \ + + sizeof(uint32) + 2 + sizeof(uint32)) #define EVENT_LEN_OFFSET 5 #define EVENT_TYPE_OFFSET 4 #define MAX_EVENT_LEN 4*1024*1024 @@ -71,11 +71,7 @@ int Log_event::write_header(FILE* file) int4store(pos, when); // timestamp pos += 4; *pos++ = get_type_code(); // event type code - int4store(pos, get_data_size() + - sizeof(time_t) // timestamp - + sizeof(char) // event code - + sizeof(uint) // event entry size - ); + int4store(pos, get_data_size() + LOG_EVENT_HEADER_LEN); pos += 4; return (my_fwrite(file, (byte*) buf, (uint) (pos - buf), MYF(MY_NABP | MY_WME))); |