-
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 #8275 from planetscale/online-ddl-vrepl-enum-to-va…
…rchar Online DDL/Vreplication suite: support ENUM->VARCHAR/TEXT type change
- Loading branch information
Showing
18 changed files
with
737 additions
and
354 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/enum-to-varchar-rename/after_columns
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 @@ | ||
id, i, e2 |
1 change: 1 addition & 0 deletions
1
go/test/endtoend/onlineddl/vrepl_suite/testdata/enum-to-varchar-rename/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 @@ | ||
change e e2 varchar(32) not null default '' |
1 change: 1 addition & 0 deletions
1
go/test/endtoend/onlineddl/vrepl_suite/testdata/enum-to-varchar-rename/before_columns
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 @@ | ||
id, i, e |
26 changes: 26 additions & 0 deletions
26
go/test/endtoend/onlineddl/vrepl_suite/testdata/enum-to-varchar-rename/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 ( | ||
id int auto_increment, | ||
i int not null, | ||
e enum('red', 'green', 'blue', 'orange') null default null collate 'utf8_bin', | ||
primary key(id) | ||
) auto_increment=1; | ||
|
||
insert into onlineddl_test values (null, 7, 'red'); | ||
|
||
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, 'red'); | ||
insert into onlineddl_test values (null, 13, 'green'); | ||
insert into onlineddl_test values (null, 17, 'blue'); | ||
set @last_insert_id := last_insert_id(); | ||
update onlineddl_test set e='orange' where id = @last_insert_id; | ||
end ;; |
1 change: 1 addition & 0 deletions
1
go/test/endtoend/onlineddl/vrepl_suite/testdata/enum-to-varchar/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 @@ | ||
change e e varchar(32) not null default '' |
26 changes: 26 additions & 0 deletions
26
go/test/endtoend/onlineddl/vrepl_suite/testdata/enum-to-varchar/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 ( | ||
id int auto_increment, | ||
i int not null, | ||
e enum('red', 'green', 'blue', 'orange') null default null collate 'utf8_bin', | ||
primary key(id) | ||
) auto_increment=1; | ||
|
||
insert into onlineddl_test values (null, 7, 'red'); | ||
|
||
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, 'red'); | ||
insert into onlineddl_test values (null, 13, 'green'); | ||
insert into onlineddl_test values (null, 17, 'blue'); | ||
set @last_insert_id := last_insert_id(); | ||
update onlineddl_test set e='orange' where id = @last_insert_id; | ||
end ;; |
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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.