mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
bug#3011 - multi-byte charset in fulltext
myisam/ft_nlq_search.c: bug#3011 - multi-byte charset in fulltext cleanup
This commit is contained in:
parent
e7776e5d0f
commit
56f8312782
3 changed files with 9 additions and 5 deletions
|
@ -64,8 +64,8 @@ static int FT_SUPERDOC_cmp(void* cmp_arg __attribute__((unused)),
|
|||
|
||||
static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
|
||||
{
|
||||
int subkeys;
|
||||
uint keylen, r, doc_cnt;
|
||||
int subkeys, r;
|
||||
uint keylen, doc_cnt;
|
||||
FT_SUPERDOC sdoc, *sptr;
|
||||
TREE_ELEMENT *selem;
|
||||
double gweight=1;
|
||||
|
@ -73,7 +73,7 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
|
|||
uchar *keybuff=aio->keybuff;
|
||||
MI_KEYDEF *keyinfo=info->s->keyinfo+aio->keynr;
|
||||
my_off_t key_root=info->s->state.key_root[aio->keynr];
|
||||
uint extra=HA_FT_WLEN+info->s->base.rec_reflength+1;
|
||||
uint extra=HA_FT_WLEN+info->s->base.rec_reflength;
|
||||
#if HA_FT_WTYPE == HA_KEYTYPE_FLOAT
|
||||
float tmp_weight;
|
||||
#else
|
||||
|
@ -96,10 +96,10 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
|
|||
|
||||
if (keylen &&
|
||||
mi_compare_text(aio->charset,info->lastkey+1,
|
||||
info->lastkey_length-extra, keybuff+1,keylen-1,0))
|
||||
info->lastkey_length-extra-1, keybuff+1,keylen-1,0))
|
||||
break;
|
||||
|
||||
subkeys=ft_sintXkorr(info->lastkey+keylen);
|
||||
subkeys=ft_sintXkorr(info->lastkey+info->lastkey_length-extra);
|
||||
if (subkeys<0)
|
||||
{
|
||||
if (doc_cnt)
|
||||
|
|
|
@ -346,6 +346,9 @@ t collation(t)
|
|||
aus Osnabrück utf8_general_ci
|
||||
SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrueck');
|
||||
t collation(t)
|
||||
SELECT t, collation(t),MATCH t AGAINST ('Osnabruck') FROM t1 WHERE MATCH t AGAINST ('Osnabruck');
|
||||
t collation(t) MATCH t AGAINST ('Osnabruck')
|
||||
aus Osnabrück utf8_general_ci 1.591139793396
|
||||
alter table t1 modify t varchar(200) collate latin1_german2_ci not null;
|
||||
SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrück');
|
||||
t collation(t)
|
||||
|
|
|
@ -268,6 +268,7 @@ SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabr
|
|||
SET NAMES latin1;
|
||||
SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrück');
|
||||
SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrueck');
|
||||
SELECT t, collation(t),MATCH t AGAINST ('Osnabruck') FROM t1 WHERE MATCH t AGAINST ('Osnabruck');
|
||||
#alter table t1 modify t text character set latin1 collate latin1_german2_ci not null;
|
||||
alter table t1 modify t varchar(200) collate latin1_german2_ci not null;
|
||||
SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrück');
|
||||
|
|
Loading…
Add table
Reference in a new issue