-
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
Merged
shlomi-noach
merged 8 commits into
vitessio:main
from
planetscale:schemadiff-fk-modify-null
Mar 6, 2024
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4a19019
Adding NULL vs NOT NULL FK column type matching in schema diff test
shlomi-noach fb39081
Adding endtoend test for modifying FK child column from NULL-able to …
shlomi-noach d13a1de
Add InstantDDLXtrabackupCapability
shlomi-noach f0fb98e
simplify test
shlomi-noach e4fceeb
Only apply ALGORITHM=COPY if MySQL does not have INSTANT DDL vs Xtrab…
shlomi-noach f87bb76
adapt tests
shlomi-noach 59c8169
correct test data path
shlomi-noach 0bf8de5
skip test if rename_table_preserve_foreign_key unsupported
shlomi-noach File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
go/test/endtoend/onlineddl/vrepl_suite/testdata/fk-child-modify-not-null/alter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
modify parent_id int not null |
15 changes: 15 additions & 0 deletions
15
go/test/endtoend/onlineddl/vrepl_suite/testdata/fk-child-modify-not-null/create.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
set session foreign_key_checks=0; | ||
drop table if exists onlineddl_test_child; | ||
drop table if exists onlineddl_test; | ||
drop table if exists onlineddl_test_parent; | ||
set session foreign_key_checks=1; | ||
create table onlineddl_test_parent ( | ||
id int auto_increment, | ||
primary key(id) | ||
); | ||
create table onlineddl_test ( | ||
id int auto_increment, | ||
parent_id int null, | ||
primary key(id), | ||
constraint test_fk foreign key (parent_id) references onlineddl_test_parent (id) on delete no action | ||
); |
1 change: 1 addition & 0 deletions
1
go/test/endtoend/onlineddl/vrepl_suite/testdata/fk-child-modify-not-null/ddl_strategy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--unsafe-allow-foreign-keys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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, modifyingNULL
toNOT 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.