add failing test for #290, invalid utf8 char
this test assumes a latin1-encoded table with content containing bytes in the \x80-\xFF, which are invalid single-byte characters in utf8 and cannot be inserted in the altered table when the column containing these characters is changed to utf8(mb4). since these characters cannot be inserted, gh-ost fails.
This commit is contained in:
parent
d726b20dda
commit
b84af7bdc7
24
localtests/latin1text-to-utf8mb4/create.sql
Normal file
24
localtests/latin1text-to-utf8mb4/create.sql
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
drop table if exists gh_ost_test;
|
||||||
|
create table gh_ost_test (
|
||||||
|
id int auto_increment,
|
||||||
|
t text charset latin1 collate latin1_swedish_ci,
|
||||||
|
primary key(id)
|
||||||
|
) auto_increment=1 charset latin1 collate latin1_swedish_ci;
|
||||||
|
|
||||||
|
insert into gh_ost_test values (null, char(128));
|
||||||
|
|
||||||
|
drop event if exists gh_ost_test;
|
||||||
|
delimiter ;;
|
||||||
|
create event gh_ost_test
|
||||||
|
on schedule every 1 second
|
||||||
|
starts current_timestamp
|
||||||
|
ends current_timestamp + interval 60 second
|
||||||
|
on completion not preserve
|
||||||
|
enable
|
||||||
|
do
|
||||||
|
begin
|
||||||
|
insert into gh_ost_test values (null, md5(rand()));
|
||||||
|
insert into gh_ost_test values (null, char(128));
|
||||||
|
update gh_ost_test set t=char(230) order by id desc limit 1;
|
||||||
|
delete from gh_ost_test where t=char(230);
|
||||||
|
end ;;
|
1
localtests/latin1text-to-utf8mb4/extra_args
Normal file
1
localtests/latin1text-to-utf8mb4/extra_args
Normal file
@ -0,0 +1 @@
|
|||||||
|
--alter "convert to character set utf8mb4 collate utf8mb4_unicode_ci"
|
1
localtests/latin1text-to-utf8mb4/ignored_versions
Normal file
1
localtests/latin1text-to-utf8mb4/ignored_versions
Normal file
@ -0,0 +1 @@
|
|||||||
|
(5.5)
|
Loading…
Reference in New Issue
Block a user