Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Online DDL/VReplication: support DROP+ADD column of same name #8337

Conversation

shlomi-noach
Copy link
Contributor

Description

It is valid (though not good practice, probably) to DROP a column c and ADD a new column also called c. In this scenario, the column c in the before table has nothing to do with c in the after table.

In this PR we import logic from gh-ost to make sure Vreplication does not try to copy data between such column.

We add the test drop-null-add-not-null to OnlineDDL/vrpelication suite.

Related Issue(s)

Checklist

  • Tests were added or are not required
  • Documentation was added or is not required

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Copy link
Contributor

@rohit-nayak-ps rohit-nayak-ps left a comment

Choose a reason for hiding this comment

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

lgtm

@shlomi-noach shlomi-noach merged commit bd5bb8c into vitessio:main Jun 16, 2021
@shlomi-noach shlomi-noach deleted the online-ddl-vrepl-suite-drop-add-same-name branch June 16, 2021 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants