mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
field_conv.cc:
Bug#11591 CHAR column with utf8 does not work properly (more chars than expected) do_cut_string didn't call well_formed_length, and copied all data, which was wrong in the case of multibyte character set. ctype_utf8.result, ctype_utf8.test: adding test case sql/field_conv.cc: Bug#11591 CHAR column with utf8 does not work properly (more chars than expected) do_cut_string didn't call well_formed_length, and copied all data, which was wrong in the case of multibyte character set. mysql-test/t/ctype_utf8.test: adding test case mysql-test/r/ctype_utf8.result: adding test caser
This commit is contained in:
@ -939,6 +939,17 @@ content msisdn
|
||||
ERR Имри.Афимим.Аеимимримдмримрмрирор имримримримр имридм ирбднримрфмририримрфмфмим.Ад.Д имдимримрад.Адимримримрмдиримримримр м.Дадимфшьмримд им.Адимимрн имадми 1234567890
|
||||
11 g 1234567890
|
||||
DROP TABLE t1,t2;
|
||||
create table t1 (a char(20) character set utf8);
|
||||
insert into t1 values ('123456'),('андрей');
|
||||
alter table t1 modify a char(2) character set utf8;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'a' at row 1
|
||||
Warning 1265 Data truncated for column 'a' at row 2
|
||||
select char_length(a), length(a), a from t1 order by a;
|
||||
char_length(a) length(a) a
|
||||
2 2 12
|
||||
2 4 ан
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
a varchar(255) NOT NULL default '',
|
||||
KEY a (a)
|
||||
|
@ -789,6 +789,16 @@ SELECT content, t2.msisdn FROM t1, t2 WHERE t1.msisdn = '1234567890';
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
#
|
||||
# Bug#11591: CHAR column with utf8 does not work properly
|
||||
# (more chars than expected)
|
||||
#
|
||||
create table t1 (a char(20) character set utf8);
|
||||
insert into t1 values ('123456'),('андрей');
|
||||
alter table t1 modify a char(2) character set utf8;
|
||||
select char_length(a), length(a), a from t1 order by a;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#9557 MyISAM utf8 table crash
|
||||
#
|
||||
|
Reference in New Issue
Block a user