diff options
-rw-r--r-- | myisam/mi_search.c | 3 | ||||
-rw-r--r-- | mysql-test/r/ctype_latin1_de.result | 5 | ||||
-rw-r--r-- | mysql-test/t/ctype_latin1_de.test | 3 |
3 files changed, 8 insertions, 3 deletions
diff --git a/myisam/mi_search.c b/myisam/mi_search.c index 4114125d6f7..d57fd1bb5b2 100644 --- a/myisam/mi_search.c +++ b/myisam/mi_search.c @@ -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 diff --git a/mysql-test/r/ctype_latin1_de.result b/mysql-test/r/ctype_latin1_de.result index 58ed0dfdbf3..e5ae6f249ee 100644 --- a/mysql-test/r/ctype_latin1_de.result +++ b/mysql-test/r/ctype_latin1_de.result @@ -192,7 +192,7 @@ strcmp('ßa','ss') strcmp('ssa','ß') strcmp('sssb','sßa') strcmp('ß','s') 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; diff --git a/mysql-test/t/ctype_latin1_de.test b/mysql-test/t/ctype_latin1_de.test index d39d7f6e5dd..e829005a229 100644 --- a/mysql-test/t/ctype_latin1_de.test +++ b/mysql-test/t/ctype_latin1_de.test @@ -38,9 +38,10 @@ select strcmp('u','öa'),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; |