mirror of
https://github.com/MariaDB/server.git
synced 2026-05-10 09:04:29 +02:00
Bug#19741 segfault with cp1250 charset + like + primary key + 64bit os
LIKE craashed with a pattern having letters in the range 128..255 (e.g. A WITH ACUTE or C WITH CARON) because of wrong cast from signed char to unsigned int. mysql-test/r/ctype_cp1250_ch.result: Adding test case mysql-test/t/ctype_cp1250_ch.test: Adding test case strings/ctype-win1250ch.c: Fixing wrong cast from "signed char" -> "uint" to "signed char" -> "unsigned char" -> uint, to properly handle bytes 128..255.
This commit is contained in:
parent
c939a8d7e5
commit
2347325117
3 changed files with 20 additions and 2 deletions
|
|
@ -42,3 +42,11 @@ id str
|
|||
6 aaaaaa
|
||||
7 aaaaaaa
|
||||
drop table t1;
|
||||
set names cp1250;
|
||||
create table t1 (a varchar(15) collate cp1250_czech_cs NOT NULL, primary key(a));
|
||||
insert into t1 values("abcdefghá");
|
||||
insert into t1 values("ááèè");
|
||||
select a from t1 where a like "abcdefghá";
|
||||
a
|
||||
abcdefghá
|
||||
drop table t1;
|
||||
|
|
|
|||
|
|
@ -44,4 +44,14 @@ INSERT INTO t1 VALUES (NULL, 'aaaaaaa');
|
|||
select * from t1 where str like 'aa%';
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#19741 segfault with cp1250 charset + like + primary key + 64bit os
|
||||
#
|
||||
set names cp1250;
|
||||
create table t1 (a varchar(15) collate cp1250_czech_cs NOT NULL, primary key(a));
|
||||
insert into t1 values("abcdefghá");
|
||||
insert into t1 values("ááèè");
|
||||
select a from t1 where a like "abcdefghá";
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue