MDEV-11241 Certain combining marks cause MariaDB to crash when doing Full-Text searches
fix it for Aria too
This commit is contained in:
parent
a1f630ccfe
commit
5e5feb84b6
@ -84,3 +84,10 @@ select count(*) from t1 where match a against ('aaayyy' in boolean mode);
|
|||||||
count(*)
|
count(*)
|
||||||
0
|
0
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
set names utf8mb4;
|
||||||
|
create table t1 (a int, b text, fulltext (b)) charset=utf8mb4 collate=utf8mb4_unicode_ci engine=aria;
|
||||||
|
insert t1 values (1000, 'C͓̙̯͔̩ͅͅi̩̘̜̲a̯̲̬̳̜̖̤o͕͓̜͓̺̖̗,̠̬͚ ̺T͇̲h͈̱e ̬̜D̖o̦̖͔̗͖̩̘c̣̼t̝͉̫̮̗o͉̫̭r̙͎̗.͓̪̥');
|
||||||
|
select a from t1 where match(b) against ('ciao' in boolean mode);
|
||||||
|
a
|
||||||
|
1000
|
||||||
|
drop table t1;
|
||||||
|
@ -75,3 +75,12 @@ select count(*) from t1 where match a against ('aaaxxx' in boolean mode);
|
|||||||
select count(*) from t1 where match a against ('aaayyy' in boolean mode);
|
select count(*) from t1 where match a against ('aaayyy' in boolean mode);
|
||||||
|
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# MDEV-11241 Certain combining marks cause MariaDB to crash when doing Full-Text searches
|
||||||
|
#
|
||||||
|
set names utf8mb4;
|
||||||
|
create table t1 (a int, b text, fulltext (b)) charset=utf8mb4 collate=utf8mb4_unicode_ci engine=aria;
|
||||||
|
insert t1 values (1000, 'C͓̙̯͔̩ͅͅi̩̘̜̲a̯̲̬̳̜̖̤o͕͓̜͓̺̖̗,̠̬͚ ̺T͇̲h͈̱e ̬̜D̖o̦̖͔̗͖̩̘c̣̼t̝͉̫̮̗o͉̫̭r̙͎̗.͓̪̥');
|
||||||
|
select a from t1 where match(b) against ('ciao' in boolean mode);
|
||||||
|
drop table t1;
|
||||||
|
@ -195,11 +195,7 @@ static int ftb_query_add_word(MYSQL_FTPARSER_PARAM *param,
|
|||||||
switch (info->type) {
|
switch (info->type) {
|
||||||
case FT_TOKEN_WORD:
|
case FT_TOKEN_WORD:
|
||||||
ftbw= (FTB_WORD *)alloc_root(&ftb_param->ftb->mem_root,
|
ftbw= (FTB_WORD *)alloc_root(&ftb_param->ftb->mem_root,
|
||||||
sizeof(FTB_WORD) +
|
sizeof(FTB_WORD) + HA_MAX_KEY_BUFF);
|
||||||
(info->trunc ? MARIA_MAX_KEY_BUFF :
|
|
||||||
word_len * ftb_param->ftb->charset->mbmaxlen +
|
|
||||||
HA_FT_WLEN +
|
|
||||||
ftb_param->ftb->info->s->rec_reflength));
|
|
||||||
ftbw->len= word_len + 1;
|
ftbw->len= word_len + 1;
|
||||||
ftbw->flags= 0;
|
ftbw->flags= 0;
|
||||||
ftbw->off= 0;
|
ftbw->off= 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user