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: reject ALTER TABLE...RENAME statements #8227

Merged
merged 1 commit into from
Jun 2, 2021

Conversation

shlomi-noach
Copy link
Contributor

@shlomi-noach shlomi-noach commented Jun 1, 2021

Description

Importing the gh-ost test fail-rename-table surfaced the fact we allow ALTER TABLE t RENAME TO t2 type of statement in online DDL.

These statements are perfectly valid for direct DDL, but make no sense for Online DDL. They're really just another form of RENAME TABLE t TO t2, which is not the kind of statement we wish to manage (online DDL is only about CREATE, DROP, ALTER at this time).

This PR outright rejects ALTER TABLE...RENAME statements when ddl strategy is online.

this is tested both at unit test level, and now also in vrepl_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>
@harshit-gangal harshit-gangal merged commit 1ff5279 into vitessio:main Jun 2, 2021
@harshit-gangal harshit-gangal deleted the online-ddl-reject-rename branch June 2, 2021 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants