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

Parse binlog timestamp in UTC - #1322

Merged
meiji163 merged 2 commits into
masterfrom
meiji163-timestamp-utc
Oct 10, 2023
Merged

meiji163 merged 2 commits into
masterfrom
meiji163-timestamp-utc

Conversation

@meiji163

@meiji163 meiji163 commented Oct 8, 2023 •

Copy link
Copy Markdown
Contributor

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.

@meiji163
meiji163 requested a review from rashiq October 9, 2023 03:34
@meiji163

meiji163 commented Oct 10, 2023 •

Copy link
Copy Markdown
Contributor Author

@meiji163
meiji163 merged commit 03f7fc8 into master Oct 10, 2023
@timvaillancourt

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants