-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Remove ALGORITHM=COPY
from Online DDL in MySQL >= 8.0.32
#15376
Remove ALGORITHM=COPY
from Online DDL in MySQL >= 8.0.32
#15376
Conversation
Signed-off-by: Shlomi Noach <[email protected]>
…NOT NULL Signed-off-by: Shlomi Noach <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15376 +/- ##
==========================================
+ Coverage 65.42% 65.43% +0.01%
==========================================
Files 1561 1562 +1
Lines 193630 193670 +40
==========================================
+ Hits 126674 126723 +49
+ Misses 66956 66947 -9 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
…ackup capability Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
Signed-off-by: Shlomi Noach <[email protected]>
{ | ||
// NOT NULL vs NULL should be fine | ||
schema: "create table t10(id int primary key, pid int not null, key (pid)); create table t11 (id int primary key, pid int null, key ix(pid), constraint f10 foreign key (pid) references t10(pid))", | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes here merely validate that as far as schemadiff
is concerned, modifying NULL
to NOT NULL
and vice versa is OK. It's related is essence to the bugfix of this PR, but isn't in any way affected by changes in this PR. These tests would have passed even before this PR. They're here for completeness.
Signed-off-by: Shlomi Noach <[email protected]>
The new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We introduce this flag file because vanilla MySQL, used by this test, cannot run foreign-key Online DDLs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I only had one minor question -- will leave that for you to decide.
Should we add this to the Related Issue(s)
section in the description?
- Fixes: https://github.com/vitessio/vitess/issues/15375
if _, exists := readTestFile(t, testName, "require_rename_table_preserve_foreign_key"); exists { | ||
if !fkOnlineDDLPossible { | ||
t.Skipf("Skipping test due to require_rename_table_preserve_foreign_key") | ||
return | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we instead use mysqlctl.GetVersionString()
here and check for the PS fork indicator in the string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what https://github.com/vitessio/vitess/pull/15376/files#diff-5b2f7e26e6a031b4098461528dca98e5ff630e70e1986f35efaab59f3fa5bd76R137-R156 does (not using version()
but using variables). The intent of the flag file is to point out that this specific test should only run where preserve_foreign_key
is supported. We can't automatically associate a specific test with this specific restriction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run it
Done. |
Description
Solves #15375
We added
ALGORITHM=COPY
in #12436 and in #12521 to overcome a MySQL8.0.29
vsXtrabackup
issue. Those we merged inrelease-16.0
.The problem was resolved as of MySQL
8.0.32
.This PR no longer adds
ALGORITHM=COPY
for Online DDL operations on8.0.32
and above. This solves #15375.Initial commit: adding tests that validate #15375
The main change in this PR conditionally undoes #12521.
Related Issue(s)
Fixes: #15375
Checklist
Deployment Notes