diff options
author | gkodinov/kgeorge@magare.gmz <> | 2007-08-06 04:57:28 -0700 |
---|---|---|
committer | gkodinov/kgeorge@magare.gmz <> | 2007-08-06 04:57:28 -0700 |
commit | 117c3ff9d7f52b2a84227412e0a88699754607b4 (patch) | |
tree | f1023c618054e8ed26dac043765fd501153cde4d /sql/time.cc | |
parent | 2bfbe2cd84e0895b2462c811e8eb3015953b503f (diff) | |
download | mariadb-git-117c3ff9d7f52b2a84227412e0a88699754607b4.tar.gz |
Bug #29536: timestamp inconsistent in replication around 1970
MySQL replicates the time zone only when operations that involve
it are performed. This is controlled by a flag. But this flag
is set only on successful operation.
The flag must be set also when there is an error that involves
a timezone (so the master would replicate the error to the slaves).
Fixed by moving the setting of the flag before the operation
(so it apples to errors as well).
Diffstat (limited to 'sql/time.cc')
-rw-r--r-- | sql/time.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/time.cc b/sql/time.cc index b4a8b047998..fb8a51fd0eb 100644 --- a/sql/time.cc +++ b/sql/time.cc @@ -228,11 +228,11 @@ my_time_t TIME_to_timestamp(THD *thd, const MYSQL_TIME *t, my_bool *in_dst_time_ my_time_t timestamp; *in_dst_time_gap= 0; + thd->time_zone_used= 1; timestamp= thd->variables.time_zone->TIME_to_gmt_sec(t, in_dst_time_gap); if (timestamp) { - thd->time_zone_used= 1; return timestamp; } |