Bug #71016 | Timestamp replication across timezones results in different times | ||
---|---|---|---|
Submitted: | 26 Nov 2013 17:42 | Modified: | 30 Jan 2014 17:09 |
Reporter: | Paul Molodowitch | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S2 (Serious) |
Version: | 5.6 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | server replication timestamp timezone |
[26 Nov 2013 17:42]
Paul Molodowitch
[26 Nov 2013 17:46]
Paul Molodowitch
I'm attaching small zipped master / slave databases which can be used to demonstrate the problem. Note that though these example databases were set up with MySQL 5.5 on windows, the problem was originally noticed/replicated on MySQL 5.6.
[26 Nov 2013 17:49]
Paul Molodowitch
Zipped master database server, to demonstrate the problem (was originally hosted on a system with UTC-8)
Attachment: MySQL_5.5_timestampTimezoneBug_masterServer.zip (application/zip, text), 668.40 KiB.
[26 Nov 2013 17:49]
Paul Molodowitch
Zipped slave database server, to demonstrate the problem (was originally hosted on a system with UTC-7)
Attachment: MySQL_5.5_timestampTimezoneBug_slaveServer.zip (application/zip, text), 592.94 KiB.
[27 Nov 2013 11:18]
Hartmut Holzgraefe
You need to set mysqld timezones explicitly, not use SYSTEM, in this case ... Not sure if this is documented properly, but if it isn't this is a replication bug at best IMHO
[27 Nov 2013 16:10]
Paul Molodowitch
Confirmed that it works if both servers have explicit default-time-zone set... thanks! This provides a solid workaround, and so lowers the severity for us. (Btw - the link to show the severity definitions is broken, at least on chrome...) However, while documentation is better than nothing, I still think this should be considered a bug and fixed, not simply documented. Consider what the consequences are (ie, data corruption and divergence), and whether you think that this would ever be the desired behavior (particularly considering that some of the timestamps - ie, the on-update/default ones - would be following one set of rules, and the rest another set). Definitely agreed, however, that this is a replication bug (I tagged the category as such).
[28 Nov 2013 18:37]
Sveta Smirnova
Thank you for the report. Actually warning about timestamps exist in the user manual at http://dev.mysql.com/doc/refman/5.6/en/replication-features-timezone.html So technically this is not even documentation bug. But at the same time http://dev.mysql.com/doc/refman/5.6/en/replication-features-timezone.html is not up to date, because now we have information about timestamps in binary logs and in case if explicit timezone was set, it is safe to use different timestamps on master and slave.
[29 Jan 2014 17:26]
Jon Stephens
The result that the submitter says that he's obtaining in Step 5--the same column showing the same literal value on both master and slave--is exactly the opposite of what we'd expect. If this happens consistently, it's a bug. Setting Category/Status to Server:Replication/Open. Removing myself as assignee.
[30 Jan 2014 17:09]
Sveta Smirnova
OK, Jon, lets it be verified server bug. Note, this behavior can be observed only if default-timezone set to SYSTEM.