summaryrefslogtreecommitdiff
path: root/sql/log_event.h
diff options
context:
space:
mode:
authorguilhem@mysql.com <>2003-06-16 23:38:33 +0200
committerguilhem@mysql.com <>2003-06-16 23:38:33 +0200
commit85b11035b74802dbd6ad2f7ecbd60004c2ae1dd8 (patch)
tree2aa003e690534217ce7e884d93fa6692cb263d44 /sql/log_event.h
parent1dccfd055d2d246edb35d2b30ed11f38e8d1a905 (diff)
downloadmariadb-git-85b11035b74802dbd6ad2f7ecbd60004c2ae1dd8.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.
Diffstat (limited to 'sql/log_event.h')
-rw-r--r--sql/log_event.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/log_event.h b/sql/log_event.h
index bb1c9260e21..d3c74f7f7c2 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -335,6 +335,17 @@ public:
by FLUSH LOGS or automatic rotation), 'created' should be 0.
This "trick" is used by MySQL >=4.0.14 slaves to know if they must drop the
stale temporary tables or not.
+ Note that when 'created'!=0, it is always equal to the event's timestamp;
+ indeed Start_log_event is written only in log.cc where the first
+ constructor below is called, in which 'created' is set to 'when'.
+ So in fact 'created' is a useless variable. When it is 0
+ we can read the actual value from timestamp ('when') and when it is
+ non-zero we can read the same value from timestamp ('when'). Conclusion:
+ - we use timestamp to print when the binlog was created.
+ - we use 'created' only to know if this is a first binlog or not.
+ In 3.23.57 we did not pay attention to this identity, so mysqlbinlog in
+ 3.23.57 does not print 'created the_date' if created was zero. This is now
+ fixed.
*/
time_t created;
uint16 binlog_version;