summaryrefslogtreecommitdiff
path: root/sql/time.cc
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-08-06 04:57:28 -0700
committerunknown <gkodinov/kgeorge@magare.gmz>2007-08-06 04:57:28 -0700
commit1f83b351818fca51a14bc34a224c4a80e14c9476 (patch)
treef1023c618054e8ed26dac043765fd501153cde4d /sql/time.cc
parent71c3c0cfd57e1d37e4f04427388f8c473283540c (diff)
downloadmariadb-git-1f83b351818fca51a14bc34a224c4a80e14c9476.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). mysql-test/r/rpl_timezone.result: Bug #29536: test case mysql-test/t/rpl_timezone.test: Bug #29536: test case sql/field.cc: Bug #29536: move setting of the flag before the operation (so it apples to errors as well). sql/time.cc: Bug #29536: move 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.cc2
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;
}