Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

config: remove strict mode from default SQL mode #316

Merged
merged 3 commits into from
May 11, 2020

Conversation

kennytm
Copy link
Collaborator

@kennytm kennytm commented May 11, 2020

What problem does this PR solve?

Relax the default SQL mode to remove the following strict mode components:

  • STRICT_TRANS_TABLES
  • NO_ZERO_IN_DATE
  • NO_ZERO_DATE
  • ERROR_FOR_DIVISION_BY_ZERO
  • NO_AUTO_CREATE_USER (said to be deprecated in MySQL docs)

The remaining enabled modes are:

  • ONLY_FULL_GROUP_BY
  • NO_ENGINE_SUBSTITUTION

What is changed and how it works?

Check List

Tests

  • Integration test

Side effects

  • Breaking backward compatibility
    • the default SQL mode is changed.

Related changes

  • Need to be included in the release note
    • Lightning no longer assumes strict SQL mode when importing data for better compatibility. If you need to enforce strict mode, please change the [tidb] sql-mode configuration.

@kennytm kennytm added status/WIP Work in progress Should Update Docs Should update docs after this PR is merged. Remove this label once the docs are updated priority/unimportant type/enhancement Performance improvement or refactoring labels May 11, 2020
@kennytm
Copy link
Collaborator Author

kennytm commented May 11, 2020

Should we enable ALLOW_INVALID_DATES by default?

@kennytm kennytm added status/PTAL This PR is ready for review. Add this label back after committing new changes and removed status/WIP Work in progress labels May 11, 2020
overvenus
overvenus previously approved these changes May 11, 2020
@overvenus overvenus added the status/LGT1 One reviewer already commented LGTM (LGTM1) label May 11, 2020
@kennytm kennytm added status/WIP Work in progress and removed status/PTAL This PR is ready for review. Add this label back after committing new changes labels May 11, 2020
@kennytm kennytm removed the status/WIP Work in progress label May 11, 2020
Copy link
Contributor

@lichunzhu lichunzhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lichunzhu lichunzhu added status/LGT2 Two reviewers already commented LGTM, ready for merge (LGTM2) and removed status/LGT1 One reviewer already commented LGTM (LGTM1) labels May 11, 2020
@lichunzhu lichunzhu merged commit 18cd93c into master May 11, 2020
@kennytm kennytm deleted the kennytm/no-strict-mode branch May 11, 2020 13:46
@kennytm kennytm removed the Should Update Docs Should update docs after this PR is merged. Remove this label once the docs are updated label Jun 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/LGT2 Two reviewers already commented LGTM, ready for merge (LGTM2) type/enhancement Performance improvement or refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants