diff options
author | unknown <serg@serg.mylan> | 2004-06-10 21:18:57 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2004-06-10 21:18:57 +0200 |
commit | b670b0b72a2f3f549985798a21f2fe8840bdcff0 (patch) | |
tree | 3cc0388adca3b345d5907760ca63b1bb0e6f6bfc /strings/ctype-win1250ch.c | |
parent | 68a132fe730d7ebcca35f9ef8cfd501a80fa93d7 (diff) | |
download | mariadb-git-b670b0b72a2f3f549985798a21f2fe8840bdcff0.tar.gz |
bug#3964 and related issues: FTB problems with charsets where one byte can match many
correct prefix compare with my_strnncoll
include/m_ctype.h:
6th argument to my_strncoll to handle prefix comparison
myisam/ft_boolean_search.c:
bug#3964 and related issues: problems with charsets where one byte can match many
*correct* prefix compare with my_strnncoll
*correct* backup of info->lastkey
mysql-test/r/fulltext.result:
6th argument to my_strncoll to handle prefix comparison
mysql-test/t/fulltext.test:
6th argument to my_strncoll to handle prefix comparison
mysys/my_handler.c:
6th argument to my_strncoll to handle prefix comparison
sql/sql_parse.cc:
cleanup
strings/ctype-big5.c:
6th argument to my_strncoll to handle prefix comparison
strings/ctype-bin.c:
6th argument to my_strncoll to handle prefix comparison
strings/ctype-czech.c:
6th argument to my_strncoll to handle prefix comparison
strings/ctype-gbk.c:
6th argument to my_strncoll to handle prefix comparison
strings/ctype-latin1.c:
6th argument to my_strncoll to handle prefix comparison
strings/ctype-mb.c:
6th argument to my_strncoll to handle prefix comparison
strings/ctype-simple.c:
6th argument to my_strncoll to handle prefix comparison
strings/ctype-sjis.c:
6th argument to my_strncoll to handle prefix comparison
strings/ctype-tis620.c:
6th argument to my_strncoll to handle prefix comparison
strings/ctype-uca.c:
6th argument to my_strncoll to handle prefix comparison
strings/ctype-ucs2.c:
6th argument to my_strncoll to handle prefix comparison
strings/ctype-utf8.c:
6th argument to my_strncoll to handle prefix comparison
strings/ctype-win1250ch.c:
6th argument to my_strncoll to handle prefix comparison
Diffstat (limited to 'strings/ctype-win1250ch.c')
-rw-r--r-- | strings/ctype-win1250ch.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c index 2eefb570170..65d20ceedc9 100644 --- a/strings/ctype-win1250ch.c +++ b/strings/ctype-win1250ch.c @@ -448,20 +448,25 @@ static struct wordvalue doubles[] = { static int my_strnncoll_win1250ch(CHARSET_INFO *cs __attribute__((unused)), const uchar * s1, uint len1, - const uchar * s2, uint len2) + const uchar * s2, uint len2, + my_bool s2_is_prefix) { int v1, v2; const uchar * p1, * p2; int pass1 = 0, pass2 = 0; int diff; + if (s2_is_prefix && len1 > len2) + len1=len2; + p1 = s1; p2 = s2; - do { + do + { NEXT_CMP_VALUE(s1, p1, pass1, v1, (int)len1); NEXT_CMP_VALUE(s2, p2, pass2, v2, (int)len2); - diff = v1 - v2; - if (diff != 0) return diff; + if ((diff = v1 - v2)) + return diff; } while (v1); return 0; } @@ -478,7 +483,7 @@ int my_strnncollsp_win1250ch(CHARSET_INFO * cs, { for ( ; slen && s[slen-1] == ' ' ; slen--); for ( ; tlen && t[tlen-1] == ' ' ; tlen--); - return my_strnncoll_win1250ch(cs,s,slen,t,tlen); + return my_strnncoll_win1250ch(cs,s,slen,t,tlen,0); } |