Allow zero in dates by timvaillancourt · Pull Request #1161 · github/gh-ost

Description

This PR merges the following downstream PRs that add support for zero in dates:

  1. Support zero date and zero in date, via dedicated command line flag openark/gh-ost#31
  2. Support tables with existing zero dates openark/gh-ost#32

Summary:

Allows the user to make schema changes that include a zero date or zero in date (e.g. adding a datetime default '0000-00-00 00:00:00' column), even if global sql_mode on MySQL has NO_ZERO_IN_DATE,NO_ZERO_DATE.

Tweaks I made:

  • Removed ignore_versions file for MySQL 5.5 and 5.6 as they're no longer tested
  • Pin golangci-lint version to match script/lint, their update today caused a problem - fix later

Thank you @shlomi-noach for the code! 👋

In case this PR introduced Go code changes:

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