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:
Josh Bielick 2021-07-09 15:32:23 -04:00
parent d726b20dda
commit b84af7bdc7
No known key found for this signature in database
GPG Key ID: 3DA8A86A1E1EF5D5
3 changed files with 26 additions and 0 deletions

View 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 ;;

View File

@ -0,0 +1 @@
--alter "convert to character set utf8mb4 collate utf8mb4_unicode_ci"

View File

@ -0,0 +1 @@
(5.5)