From 13b17b93c432cc9ae6f061d29ba32be1fd8dda61 Mon Sep 17 00:00:00 2001 From: Shlomi Noach Date: Tue, 20 Nov 2018 19:35:03 +0200 Subject: [PATCH 1/3] testing: convert to character set utf8mb4 --- localtests/convert-utf8mb4/create.sql | 25 +++++++++++++++++++++++++ localtests/convert-utf8mb4/extra_args | 1 + 2 files changed, 26 insertions(+) create mode 100644 localtests/convert-utf8mb4/create.sql create mode 100644 localtests/convert-utf8mb4/extra_args diff --git a/localtests/convert-utf8mb4/create.sql b/localtests/convert-utf8mb4/create.sql new file mode 100644 index 0000000..cf36d5f --- /dev/null +++ b/localtests/convert-utf8mb4/create.sql @@ -0,0 +1,25 @@ +drop table if exists gh_ost_test; +create table gh_ost_test ( + id int auto_increment, + t varchar(128) charset utf8 collate utf8_general_ci, + ta varchar(128) charset ascii not null, + primary key(id) +) auto_increment=1; + +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()), 'a'); + insert into gh_ost_test values (null, 'novo proprietário', 'b'); + insert into gh_ost_test values (null, 'usuário', 'c'); + insert into gh_ost_test values (null, 'usuário', 'x'); + + delete from gh_ost_test where ta='x' order by id desc limit 1; +end ;; diff --git a/localtests/convert-utf8mb4/extra_args b/localtests/convert-utf8mb4/extra_args new file mode 100644 index 0000000..2b2f64d --- /dev/null +++ b/localtests/convert-utf8mb4/extra_args @@ -0,0 +1 @@ +--alter='convert to character set utf8mb4' From 5d4d1cd31bd8a09760e6972311fec987f58a3c56 Mon Sep 17 00:00:00 2001 From: Shlomi Noach Date: Tue, 20 Nov 2018 19:37:51 +0200 Subject: [PATCH 2/3] more interesting sample data --- localtests/convert-utf8mb4/create.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/localtests/convert-utf8mb4/create.sql b/localtests/convert-utf8mb4/create.sql index cf36d5f..083174a 100644 --- a/localtests/convert-utf8mb4/create.sql +++ b/localtests/convert-utf8mb4/create.sql @@ -6,6 +6,8 @@ create table gh_ost_test ( primary key(id) ) auto_increment=1; +insert into gh_ost_test values (null, 'Hello world, Καλημέρα κόσμε, コンニチハ', 'initial'); + drop event if exists gh_ost_test; delimiter ;; create event gh_ost_test @@ -18,7 +20,7 @@ create event gh_ost_test begin insert into gh_ost_test values (null, md5(rand()), 'a'); insert into gh_ost_test values (null, 'novo proprietário', 'b'); - insert into gh_ost_test values (null, 'usuário', 'c'); + insert into gh_ost_test values (null, '2H₂ + O₂ ⇌ 2H₂O, R = 4.7 kΩ, ⌀ 200 mm', 'c'); insert into gh_ost_test values (null, 'usuário', 'x'); delete from gh_ost_test where ta='x' order by id desc limit 1; From a7aa4eb2c03f58e92e845818b97c358f9d14aee1 Mon Sep 17 00:00:00 2001 From: Shlomi Noach Date: Tue, 20 Nov 2018 19:48:59 +0200 Subject: [PATCH 3/3] adding latin1 --- localtests/convert-utf8mb4/create.sql | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/localtests/convert-utf8mb4/create.sql b/localtests/convert-utf8mb4/create.sql index 083174a..05f1a13 100644 --- a/localtests/convert-utf8mb4/create.sql +++ b/localtests/convert-utf8mb4/create.sql @@ -2,11 +2,15 @@ drop table if exists gh_ost_test; create table gh_ost_test ( id int auto_increment, t varchar(128) charset utf8 collate utf8_general_ci, + tl varchar(128) charset latin1 not null, ta varchar(128) charset ascii not null, primary key(id) ) auto_increment=1; -insert into gh_ost_test values (null, 'Hello world, Καλημέρα κόσμε, コンニチハ', 'initial'); +insert into gh_ost_test values (null, 'átesting'); + + +insert into gh_ost_test values (null, 'Hello world, Καλημέρα κόσμε, コンニチハ', 'átesting0', 'initial'); drop event if exists gh_ost_test; delimiter ;; @@ -18,10 +22,10 @@ create event gh_ost_test enable do begin - insert into gh_ost_test values (null, md5(rand()), 'a'); - insert into gh_ost_test values (null, 'novo proprietário', 'b'); - insert into gh_ost_test values (null, '2H₂ + O₂ ⇌ 2H₂O, R = 4.7 kΩ, ⌀ 200 mm', 'c'); - insert into gh_ost_test values (null, 'usuário', 'x'); + insert into gh_ost_test values (null, md5(rand()), 'átesting-a', 'a'); + insert into gh_ost_test values (null, 'novo proprietário', 'átesting-b', 'b'); + insert into gh_ost_test values (null, '2H₂ + O₂ ⇌ 2H₂O, R = 4.7 kΩ, ⌀ 200 mm', 'átesting-c', 'c'); + insert into gh_ost_test values (null, 'usuário', 'átesting-x', 'x'); delete from gh_ost_test where ta='x' order by id desc limit 1; end ;;