Online DDL: reject ALTER TABLE...RENAME statements #8227
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Importing the
gh-ost
testfail-rename-table
surfaced the fact we allowALTER 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 aboutCREATE
,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