-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding endtoend test for modifying FK child column from NULL-able to …
…NOT NULL Signed-off-by: Shlomi Noach <[email protected]>
- Loading branch information
1 parent
4a19019
commit fb39081
Showing
4 changed files
with
20 additions
and
1 deletion.
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
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 |
17 changes: 17 additions & 0 deletions
17
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,17 @@ | ||
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, | ||
ts timestamp, | ||
primary key(id) | ||
); | ||
create table onlineddl_test ( | ||
id int auto_increment, | ||
i int not null, | ||
parent_id int null, | ||
primary key(id), | ||
constraint test_fk foreign key (parent_id) references onlineddl_test_parent (id) on delete no action | ||
) auto_increment=1; |
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 |