mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
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
This commit is contained in:
parent
2e8fc0cae2
commit
1e24da548b
19 changed files with 143 additions and 60 deletions
|
|
@ -322,7 +322,7 @@ uint my_instr_mb(CHARSET_INFO *cs,
|
|||
int mblen;
|
||||
|
||||
if (!cs->coll->strnncoll(cs, (unsigned char*) b, s_length,
|
||||
(unsigned char*) s, s_length))
|
||||
(unsigned char*) s, s_length, 0))
|
||||
{
|
||||
if (nmatch)
|
||||
{
|
||||
|
|
@ -352,10 +352,19 @@ uint my_instr_mb(CHARSET_INFO *cs,
|
|||
|
||||
static int my_strnncoll_mb_bin(CHARSET_INFO * cs __attribute__((unused)),
|
||||
const uchar *s, uint slen,
|
||||
const uchar *t, uint tlen)
|
||||
const uchar *t, uint tlen,
|
||||
my_bool t_is_prefix)
|
||||
{
|
||||
int cmp= memcmp(s,t,min(slen,tlen));
|
||||
return cmp ? cmp : (int) (slen - tlen);
|
||||
uint len=min(slen,tlen);
|
||||
int cmp= memcmp(s,t,len);
|
||||
return cmp ? cmp : (int) ((t_is_prefix ? len : slen) - tlen);
|
||||
}
|
||||
|
||||
static int my_strnncollsp_mb_bin(CHARSET_INFO * cs __attribute__((unused)),
|
||||
const uchar *s, uint slen,
|
||||
const uchar *t, uint tlen)
|
||||
{
|
||||
return my_strnncoll_mb_bin(cs,s,slen,t,tlen,0);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -513,7 +522,7 @@ static int my_wildcmp_mb_bin(CHARSET_INFO *cs,
|
|||
MY_COLLATION_HANDLER my_collation_mb_bin_handler =
|
||||
{
|
||||
my_strnncoll_mb_bin,
|
||||
my_strnncoll_mb_bin,
|
||||
my_strnncollsp_mb_bin,
|
||||
my_strnxfrm_mb_bin,
|
||||
my_like_range_simple,
|
||||
my_wildcmp_mb_bin,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue