Bug #2368 Multibyte charsets do not check that incoming data is well-formed

It was together with the previous but. This test tends to prove it.
parent 0a1ceb66
......@@ -143,3 +143,27 @@ length(s1) char_length(s1)
65535 43690
65534 32767
drop table t1;
create table t1 (s1 char(10) character set utf8);
insert into t1 values (0x41FF);
Warnings:
Warning 1264 Data truncated for column 's1' at row 1
select hex(s1) from t1;
hex(s1)
41
drop table t1;
create table t1 (s1 varchar(10) character set utf8);
insert into t1 values (0x41FF);
Warnings:
Warning 1264 Data truncated for column 's1' at row 1
select hex(s1) from t1;
hex(s1)
41
drop table t1;
create table t1 (s1 text character set utf8);
insert into t1 values (0x41FF);
Warnings:
Warning 1264 Data truncated for column 's1' at row 1
select hex(s1) from t1;
hex(s1)
41
drop table t1;
......@@ -80,3 +80,21 @@ insert into t1 select repeat('
insert into t1 select repeat('',66000);
select length(s1),char_length(s1) from t1;
drop table t1;
#
# Bug #2368 Multibyte charsets do not check that incoming data is well-formed
#
create table t1 (s1 char(10) character set utf8);
insert into t1 values (0x41FF);
select hex(s1) from t1;
drop table t1;
create table t1 (s1 varchar(10) character set utf8);
insert into t1 values (0x41FF);
select hex(s1) from t1;
drop table t1;
create table t1 (s1 text character set utf8);
insert into t1 values (0x41FF);
select hex(s1) from t1;
drop table t1;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment