From 1f83b351818fca51a14bc34a224c4a80e14c9476 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 6 Aug 2007 04:57:28 -0700 Subject: 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). --- sql/time.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/time.cc') 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; } -- cgit v1.2.1