Commit 9fae3956 authored by serg@sergbook.mysql.com's avatar serg@sergbook.mysql.com
Browse files

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

parent 1b29ee50
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -659,7 +659,8 @@ int _mi_compare_text(CHARSET_INFO *charset_info, uchar *a, uint a_length,
#ifdef USE_STRCOLL
  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);
  }
  else
+4 −1
Original line number Diff line number Diff line
@@ -192,7 +192,7 @@ strcmp('
select strcmp('u','a'),strcmp('u','');
strcmp('u','a')	strcmp('u','')
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");
select * from t1 where a like "abc%";
a
@@ -204,4 +204,7 @@ test
select * from t1 where a like "te_t";
a
test
select * from t1 where match a against ("te*" in boolean mode)+0;
a
test
drop table t1;
+2 −1
Original line number Diff line number Diff line
@@ -38,9 +38,10 @@ select strcmp('u','
# 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");
select * from t1 where a like "abc%"; 
select * from t1 where a like "test%"; 
select * from t1 where a like "te_t"; 
select * from t1 where match a against ("te*" in boolean mode)+0;
drop table t1;