Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

sycner: automatically use upstream sql_mode #1306

Merged
merged 3 commits into from
Nov 26, 2020

Conversation

GMHDBJD
Copy link
Collaborator

@GMHDBJD GMHDBJD commented Nov 26, 2020

What problem does this PR solve?

Inconsistent upstream and downstream sql_mode leads to inconsistent data

What is changed and how it works?

get dsn scope sql_mode from upstream database if sql_mode is not specified in task config.

Still can't use different session sql_mode base on different binlog event like mysql master-slave replication. One solution is get sql_mode from begin event and apply it for rows event in same txn, which is ineffective.

Check List

Tests

  • Integration test

@GMHDBJD GMHDBJD added status/PTAL This PR is ready for review. Add this label back after committing new changes needs-cherry-pick-release-2.0 This PR should be cherry-picked to release-2.0. Remove this label after cherry-picked to release-2.0 labels Nov 26, 2020
Copy link
Collaborator

@lance6716 lance6716 left a comment

Choose a reason for hiding this comment

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

rest LGTM

syncer/syncer.go Outdated Show resolved Hide resolved
Copy link
Member

@csuzhangxc csuzhangxc left a comment

Choose a reason for hiding this comment

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

LGTM

@csuzhangxc csuzhangxc added status/LGT1 One reviewer already commented LGTM and removed status/PTAL This PR is ready for review. Add this label back after committing new changes labels Nov 26, 2020
@csuzhangxc csuzhangxc added this to the v2.0.1 milestone Nov 26, 2020
@lance6716 lance6716 merged commit e51b4fe into pingcap:master Nov 26, 2020
ti-srebot pushed a commit to ti-srebot/dm that referenced this pull request Nov 26, 2020
@ti-srebot
Copy link

cherry pick to release-2.0 in PR #1307

@ti-srebot ti-srebot added the already-cherry-pick-2.0 The related PR is already cherry-picked to release-2.0. Add this label once the PR is cherry-picked label Nov 26, 2020
GMHDBJD pushed a commit that referenced this pull request Nov 26, 2020
@lance6716 lance6716 removed the needs-cherry-pick-release-2.0 This PR should be cherry-picked to release-2.0. Remove this label after cherry-picked to release-2.0 label Apr 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
already-cherry-pick-2.0 The related PR is already cherry-picked to release-2.0. Add this label once the PR is cherry-picked status/LGT1 One reviewer already commented LGTM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants