Commit 80e088b4 authored by unknown's avatar unknown

make SEARCH_PREFIX to work with complex (use_coll) charsets, namely latin1_de

parent b6fcfd5c
...@@ -659,7 +659,8 @@ int _mi_compare_text(CHARSET_INFO *charset_info, uchar *a, uint a_length, ...@@ -659,7 +659,8 @@ int _mi_compare_text(CHARSET_INFO *charset_info, uchar *a, uint a_length,
#ifdef USE_STRCOLL #ifdef USE_STRCOLL
if (use_strcoll(charset_info)) if (use_strcoll(charset_info))
{ {
/* QQ: This needs to work with part keys at some point */ if (part_key && b_length < a_length)
a_length=b_length;
return my_strnncoll(charset_info, a, a_length, b, b_length); return my_strnncoll(charset_info, a, a_length, b, b_length);
} }
else else
......
...@@ -192,7 +192,7 @@ strcmp(' ...@@ -192,7 +192,7 @@ strcmp('
select strcmp('u','a'),strcmp('u',''); select strcmp('u','a'),strcmp('u','');
strcmp('u','a') strcmp('u','') strcmp('u','a') strcmp('u','')
1 1 1 1
create table t1 (a varchar(10), key(a)); create table t1 (a varchar(10), key(a), fulltext (a));
insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test"); insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test");
select * from t1 where a like "abc%"; select * from t1 where a like "abc%";
a a
...@@ -204,4 +204,7 @@ test ...@@ -204,4 +204,7 @@ test
select * from t1 where a like "te_t"; select * from t1 where a like "te_t";
a a
test test
select * from t1 where match a against ("te*" in boolean mode)+0;
a
test
drop table t1; drop table t1;
...@@ -38,9 +38,10 @@ select strcmp('u',' ...@@ -38,9 +38,10 @@ select strcmp('u','
# Some other simple tests with the current character set # Some other simple tests with the current character set
# #
create table t1 (a varchar(10), key(a)); create table t1 (a varchar(10), key(a), fulltext (a));
insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test"); insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test");
select * from t1 where a like "abc%"; select * from t1 where a like "abc%";
select * from t1 where a like "test%"; select * from t1 where a like "test%";
select * from t1 where a like "te_t"; select * from t1 where a like "te_t";
select * from t1 where match a against ("te*" in boolean mode)+0;
drop table 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