-
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.
v19 backport: Online DDL: avoid SQL's
CONVERT(...)
, convert program…
…matically if needed (#16603) Signed-off-by: Shlomi Noach <[email protected]>
- Loading branch information
1 parent
93307a2
commit 3c40125
Showing
9 changed files
with
112 additions
and
21 deletions.
There are no files selected for viewing
Empty file.
1 change: 1 addition & 0 deletions
1
go/test/endtoend/onlineddl/vrepl_suite/testdata/alter-charset-non-utf8-80-vcopier/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 `t1` varchar(128) CHARACTER SET utf8mb4 NOT NULL, MODIFY `t2` varchar(128) CHARACTER SET latin2 NOT NULL, MODIFY `tutf8` varchar(128) CHARACTER SET latin1 NOT NULL |
19 changes: 19 additions & 0 deletions
19
go/test/endtoend/onlineddl/vrepl_suite/testdata/alter-charset-non-utf8-80-vcopier/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,19 @@ | ||
drop table if exists onlineddl_test; | ||
create table onlineddl_test ( | ||
id int auto_increment, | ||
t1 varchar(128) charset latin1 collate latin1_swedish_ci, | ||
t2 varchar(128) charset latin1 collate latin1_swedish_ci, | ||
tutf8 varchar(128) charset utf8, | ||
tutf8mb4 varchar(128) charset utf8mb4, | ||
tlatin1 varchar(128) charset latin1 collate latin1_swedish_ci, | ||
primary key(id) | ||
) auto_increment=1; | ||
|
||
insert into onlineddl_test values (null, md5(rand()), md5(rand()), md5(rand()), md5(rand()), md5(rand())); | ||
insert into onlineddl_test values (null, 'átesting', 'átesting', 'átesting', 'átesting', 'átesting'); | ||
insert into onlineddl_test values (null, 'testátest', 'testátest', 'testátest', '🍻😀', 'átesting'); | ||
insert into onlineddl_test values (null, 'átesting-binlog', 'átesting-binlog', 'átesting-binlog', 'átesting-binlog', 'átesting-binlog'); | ||
insert into onlineddl_test values (null, 'testátest-binlog', 'testátest-binlog', 'testátest-binlog', '🍻😀', 'átesting-binlog'); | ||
insert into onlineddl_test values (null, 'átesting-bnull', 'átesting-bnull', 'átesting-bnull', null, null); | ||
|
||
drop event if exists onlineddl_test; |
1 change: 1 addition & 0 deletions
1
...endtoend/onlineddl/vrepl_suite/testdata/alter-charset-non-utf8-80-vcopier/ignore_versions
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 @@ | ||
(5.5|5.6|5.7) |
Empty file.
30 changes: 30 additions & 0 deletions
30
go/test/endtoend/onlineddl/vrepl_suite/testdata/non-utf8-charset-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,30 @@ | ||
drop table if exists onlineddl_test; | ||
create table onlineddl_test ( | ||
id varchar(128) charset latin1 collate latin1_swedish_ci, | ||
t1 varchar(128) charset latin1 collate latin1_swedish_ci, | ||
t2 varchar(128) charset latin1 collate latin1_swedish_ci, | ||
tutf8 varchar(128) charset utf8, | ||
tutf8mb4 varchar(128) charset utf8mb4, | ||
tlatin1 varchar(128) charset latin1 collate latin1_swedish_ci, | ||
primary key(id) | ||
) auto_increment=1; | ||
|
||
insert into onlineddl_test values (concat('átesting-', md5(rand())), md5(rand()), md5(rand()), md5(rand()), md5(rand()), md5(rand())); | ||
insert into onlineddl_test values (concat('átesting-', md5(rand())), 'átesting', 'átesting', 'átesting', 'átesting', 'átesting'); | ||
insert into onlineddl_test values (concat('átesting-', md5(rand())), 'testátest', 'testátest', 'testátest', '🍻😀', 'átesting'); | ||
|
||
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 (concat('átesting-', md5(rand())), md5(rand()), md5(rand()), md5(rand()), md5(rand()), md5(rand())); | ||
insert into onlineddl_test values (concat('átesting-', md5(rand())), 'átesting-binlog', 'átesting-binlog', 'átesting-binlog', 'átesting-binlog', 'átesting-binlog'); | ||
insert into onlineddl_test values (concat('átesting-', md5(rand())), 'testátest-binlog', 'testátest-binlog', 'testátest-binlog', '🍻😀', 'átesting-binlog'); | ||
insert into onlineddl_test values (concat('átesting-', md5(rand())), 'átesting-bnull', 'átesting-bnull', 'átesting-bnull', null, null); | ||
end ;; |
1 change: 1 addition & 0 deletions
1
go/test/endtoend/onlineddl/vrepl_suite/testdata/non-utf8-charset-pk/ignore_versions
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 @@ | ||
(5.5|5.6|5.7) |
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