-
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.
Merge pull request #8423 from planetscale/vrepl-any-uk-source-target
VReplication: support different keys on source and target tables (different covered columns)
- Loading branch information
Showing
23 changed files
with
774 additions
and
297 deletions.
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/different-pk-int-to-text/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 id int unsigned not null, drop primary key, add primary key (uu) |
24 changes: 24 additions & 0 deletions
24
go/test/endtoend/onlineddl/vrepl_suite/testdata/different-pk-int-to-text/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,24 @@ | ||
drop table if exists onlineddl_test; | ||
create table onlineddl_test ( | ||
id int auto_increment, | ||
uu varchar(64) not null, | ||
ts timestamp, | ||
primary key(id) | ||
) auto_increment=1; | ||
|
||
insert into onlineddl_test values (null, uuid(), now()); | ||
|
||
drop event if exists onlineddl_test; | ||
delimiter ;; | ||
create event onlineddl_test | ||
on schedule every 1 second | ||
starts current_timestamp | ||
ends current_timestamp + interval 60 second | ||
on completion not preserve | ||
enable | ||
do | ||
begin | ||
insert into onlineddl_test values (null, uuid(), now()); | ||
insert into onlineddl_test values (null, uuid(), now()); | ||
insert into onlineddl_test values (null, uuid(), now()); | ||
end ;; |
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
File renamed without changes.
24 changes: 24 additions & 0 deletions
24
go/test/endtoend/onlineddl/vrepl_suite/testdata/extend-pk/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,24 @@ | ||
drop table if exists onlineddl_test; | ||
create table onlineddl_test ( | ||
id int auto_increment, | ||
i int not null, | ||
ts timestamp, | ||
primary key(id) | ||
) auto_increment=1; | ||
|
||
insert into onlineddl_test values (null, 3, now()); | ||
|
||
drop event if exists onlineddl_test; | ||
delimiter ;; | ||
create event onlineddl_test | ||
on schedule every 1 second | ||
starts current_timestamp | ||
ends current_timestamp + interval 60 second | ||
on completion not preserve | ||
enable | ||
do | ||
begin | ||
insert into onlineddl_test values (null, 11, now()); | ||
insert into onlineddl_test values (null, 13, now()); | ||
insert into onlineddl_test values (null, 17, now()); | ||
end ;; |
1 change: 1 addition & 0 deletions
1
go/test/endtoend/onlineddl/vrepl_suite/testdata/fail-different-pk-new-pk-column/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 @@ | ||
drop primary key, add column id int unsigned auto_increment primary key |
26 changes: 26 additions & 0 deletions
26
go/test/endtoend/onlineddl/vrepl_suite/testdata/fail-different-pk-new-pk-column/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,26 @@ | ||
drop table if exists onlineddl_test; | ||
create table onlineddl_test ( | ||
uu varchar(64) not null, | ||
ts timestamp, | ||
primary key(uu) | ||
); | ||
|
||
insert into onlineddl_test values (uuid(), now()); | ||
|
||
drop event if exists onlineddl_test; | ||
delimiter ;; | ||
create event onlineddl_test | ||
on schedule every 1 second | ||
starts current_timestamp | ||
ends current_timestamp + interval 60 second | ||
on completion not preserve | ||
enable | ||
do | ||
begin | ||
insert into onlineddl_test values (uuid(), now()); | ||
insert into onlineddl_test values (uuid(), now()); | ||
|
||
set @uu := uuid(); | ||
insert into onlineddl_test values (@uu, now()); | ||
update onlineddl_test set ts=now() + interval 1 hour where uu=@uu; | ||
end ;; |
1 change: 1 addition & 0 deletions
1
...st/endtoend/onlineddl/vrepl_suite/testdata/fail-different-pk-new-pk-column/expect_failure
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 @@ | ||
Found no possible |
1 change: 0 additions & 1 deletion
1
go/test/endtoend/onlineddl/vrepl_suite/testdata/fail-no-shared-uk/expect_failure
This file was deleted.
Oops, something went wrong.
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/no-shared-uk/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 @@ | ||
drop primary key, add primary key (id, i) |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
go/test/endtoend/onlineddl/vrepl_suite/testdata/reduce-pk/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 @@ | ||
drop primary key, add primary key (id) |
24 changes: 24 additions & 0 deletions
24
go/test/endtoend/onlineddl/vrepl_suite/testdata/reduce-pk/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,24 @@ | ||
drop table if exists onlineddl_test; | ||
create table onlineddl_test ( | ||
id int auto_increment, | ||
i int not null, | ||
ts timestamp, | ||
primary key(id, i) | ||
) auto_increment=1; | ||
|
||
insert into onlineddl_test values (null, 3, now()); | ||
|
||
drop event if exists onlineddl_test; | ||
delimiter ;; | ||
create event onlineddl_test | ||
on schedule every 1 second | ||
starts current_timestamp | ||
ends current_timestamp + interval 60 second | ||
on completion not preserve | ||
enable | ||
do | ||
begin | ||
insert into onlineddl_test values (null, 11, now()); | ||
insert into onlineddl_test values (null, 13, now()); | ||
insert into onlineddl_test values (null, 17, now()); | ||
end ;; |
Oops, something went wrong.