1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Bug#17374: select ... like 'A%' operator fails to find value on columuns with key

Fixed that LIKE worked case insensitively for latin2_czech_cs,
which was wrong for a case sensitive collation.


include/m_ctype.h:
  Making my_wildcmp_bin public instead of static
strings/ctype-bin.c:
  Making my_wildcmp_bin public instead of static
strings/ctype-czech.c:
  Use my_wildcmp_bin instead of case insensitive my_wildcmp_8bit
mysql-test/include/have_latin2_ch.inc:
  New BitKeeper file ``mysql-test/include/have_latin2_ch.inc''
mysql-test/r/ctype_latin2_ch.result:
  New BitKeeper file ``mysql-test/r/ctype_latin2_ch.result''
mysql-test/r/have_latin2_ch.require:
  New BitKeeper file ``mysql-test/r/have_latin2_ch.require''
mysql-test/t/ctype_latin2_ch.test:
  New BitKeeper file ``mysql-test/t/ctype_latin2_ch.test''
This commit is contained in:
unknown
2006-03-20 16:28:25 +04:00
parent 367442f754
commit 83bc8c4e38
7 changed files with 76 additions and 5 deletions

View File

@ -0,0 +1,4 @@
-- require r/have_latin2_ch.require
disable_query_log;
show collation like "latin2_czech_cs";
enable_query_log;

View File

@ -0,0 +1,30 @@
drop table if exists t1;
set names latin2;
select 'A' = 'a' collate latin2_czech_cs;
'A' = 'a' collate latin2_czech_cs
0
create table t1 (
id int(5) not null,
tt char(255) not null
) character set latin2 collate latin2_czech_cs;
insert into t1 values (1,'Aa');
insert into t1 values (2,'Aas');
alter table t1 add primary key aaa(tt);
select * from t1 where tt like 'Aa%';
id tt
1 Aa
2 Aas
select * from t1 ignore index (primary) where tt like 'Aa%';
id tt
1 Aa
2 Aas
select * from t1 where tt like '%Aa%';
id tt
1 Aa
2 Aas
select * from t1 where tt like 'AA%';
id tt
select * from t1 ignore index (primary) where tt like 'AA%';
id tt
select * from t1 where tt like '%AA%';
id tt

View File

@ -0,0 +1,2 @@
Collation Charset Id Default Compiled Sortlen
latin2_czech_cs latin2 2 Yes 4

View File

@ -0,0 +1,30 @@
-- source include/have_latin2_ch.inc
#
# Tests with latin2_czech_cs
#
--disable_warnings
drop table if exists t1;
--enable_warnings
#
# Bug#17374: select ... like 'A%' operator fails
# to find value on columuns with key
#
set names latin2;
select 'A' = 'a' collate latin2_czech_cs;
create table t1 (
id int(5) not null,
tt char(255) not null
) character set latin2 collate latin2_czech_cs;
insert into t1 values (1,'Aa');
insert into t1 values (2,'Aas');
alter table t1 add primary key aaa(tt);
select * from t1 where tt like 'Aa%';
select * from t1 ignore index (primary) where tt like 'Aa%';
select * from t1 where tt like '%Aa%';
select * from t1 where tt like 'AA%';
select * from t1 ignore index (primary) where tt like 'AA%';
select * from t1 where tt like '%AA%';
# End of 4.1 tests