MDEV-9986 Full-text search of the utf8mb4 column causes crash
take into account that agg_arg_charsets_for_comparison() can replace Item_field's with Item_func_conv_charset
This commit is contained in:
parent
7f5ceb7768
commit
29868de2ff
@ -15,3 +15,15 @@ CREATE TABLE t1(a VARCHAR(2) CHARACTER SET big5 COLLATE big5_chinese_ci,
|
||||
FULLTEXT(a));
|
||||
INSERT INTO t1 VALUES(0xA3C2);
|
||||
DROP TABLE t1;
|
||||
create table t1 (
|
||||
id varchar(255),
|
||||
business_name text null collate utf8mb4_unicode_ci,
|
||||
street_address text,
|
||||
fulltext index ft (business_name),
|
||||
fulltext index ft2 (street_address)
|
||||
);
|
||||
select * from t1 where match (business_name, street_address) against ('some business name and address here');
|
||||
ERROR HY000: Can't find FULLTEXT index matching the column list
|
||||
select * from t1 where match (business_name, street_address) against ('some business name and address here' in boolean mode);
|
||||
id business_name street_address
|
||||
drop table t1;
|
||||
|
@ -32,3 +32,18 @@ INSERT INTO t1 VALUES(0xA3C2);
|
||||
DROP TABLE t1;
|
||||
|
||||
# End of 5.1 tests
|
||||
|
||||
#
|
||||
# MDEV-9986 Full-text search of the utf8mb4 column causes crash
|
||||
#
|
||||
create table t1 (
|
||||
id varchar(255),
|
||||
business_name text null collate utf8mb4_unicode_ci,
|
||||
street_address text,
|
||||
fulltext index ft (business_name),
|
||||
fulltext index ft2 (street_address)
|
||||
);
|
||||
--error ER_FT_MATCHING_KEY_NOT_FOUND
|
||||
select * from t1 where match (business_name, street_address) against ('some business name and address here');
|
||||
select * from t1 where match (business_name, street_address) against ('some business name and address here' in boolean mode);
|
||||
drop table t1;
|
||||
|
@ -6366,6 +6366,8 @@ bool Item_func_match::fix_index()
|
||||
|
||||
for (i=1; i < arg_count; i++)
|
||||
{
|
||||
if (args[i]->type() != FIELD_ITEM)
|
||||
goto err;
|
||||
item=(Item_field*)args[i];
|
||||
for (keynr=0 ; keynr < fts ; keynr++)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user