summaryrefslogtreecommitdiff
path: root/sql/log_event.cc
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2003-06-16 23:38:33 +0200
committerunknown <guilhem@mysql.com>2003-06-16 23:38:33 +0200
commit418fcdf16aeeb2db41b2dafd1ac9338233a3fd1d (patch)
tree2aa003e690534217ce7e884d93fa6692cb263d44 /sql/log_event.cc
parent07d6a199557308f49a8e700de95747f638b7dccd (diff)
downloadmariadb-git-418fcdf16aeeb2db41b2dafd1ac9338233a3fd1d.tar.gz
Do not use 'created' for time anymore in Start_log_event, it's the same
as the already-stored timestamp. Now 'created' is used only to know if this is a first binlog or not. And we may re-use the superfluous bytes in 5.0 when we need room. sql/log_event.cc: This sort of reverts a change I made in 3.23.57. In 3.23.57 I set 'created' to 0 if this was a non-first binlog, so I made mysqlbinlog not print the "created xx" part if created == 0. While this was sensible, as 'created' is 0 or equal to the timestamp which is already stored in the event, we can always print "created xx" by using the timestamp, and leaving the use of 'created' only to know if this is a first binlog or not (which we print as "created at startup"). sql/log_event.h: In Start_log_event, 'created' is always the same as 'when', or O. We didn't need 4 bytes for this, a bit would have been enough (O or "same as 'when'"). Possibly in 5.0 we will re-use the useless bytes.
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r--sql/log_event.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 62d6bef3a51..b89f3c151a7 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -302,13 +302,11 @@ void Start_log_event::print(FILE* file, bool short_form, char* last_db)
return;
print_header(file);
- fprintf(file, "\tStart: binlog v %d, server v %s", binlog_version,
+ fprintf(file, "\tStart: binlog v %d, server v %s created ", binlog_version,
server_version);
+ print_timestamp(file);
if (created)
- {
- fprintf(file, " created ");
- print_timestamp(file, &created);
- }
+ fprintf(file," at startup");
fputc('\n', file);
fflush(file);
}