summaryrefslogtreecommitdiff
path: root/sql/log_event.cc
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2000-08-23 13:27:33 -0600
committerunknown <sasha@mysql.sashanet.com>2000-08-23 13:27:33 -0600
commit4788f4715b240220dc7998781ed01609c6a66563 (patch)
tree3f55e8ba2a24b35f6a2e7955062c5a5673c2bd05 /sql/log_event.cc
parentdd7a4b2ac5cd94f02e091dbe86dadfc9a5e1048a (diff)
downloadmariadb-git-4788f4715b240220dc7998781ed01609c6a66563.tar.gz
Replication fixes
sql/log_event.cc: changed uint to uint32 in all places where the code depended on sizeof(uint) to be 4 sql/log_event.h: changed uint to uint32 in all places where the code depended on sizeof(uint) to be 4 sql/slave.cc: Monty's I64 fix broke my fprintf(), to fix it, changed to use llstr() to print mi->pos that has become ulonglong
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r--sql/log_event.cc12
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)));