Parse binlog timestamp in UTC by meiji163 · Pull Request #1322 · github/gh-ost

Description

This PR addresses a situation where TIMESTAMP fields can be corrupted. Quoting @dm-2:

gh-ost is incorrectly modifying the timezone of timestamp fields of rows when the following criteria are met:

  • database is running in non-UTC timezone, and
  • row is changed whilst a migration is running, and
  • field is timestamp, and
  • field contains a non-UTC timestamp

This is caused by how go-mysql/replication package parses binlog timestamps based on timezone. In the latest release this behaviour was disabled by editing the vendored package 7e0bdbe , but in the master branch it is enabled.

  • contributed code is using same conventions as original code
  • script/cibuild returns with no formatting errors, build errors or unit test errors.