summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-04-26 12:58:14 +0200
committerSergei Golubchik <serg@mariadb.org>2016-04-26 12:58:14 +0200
commit29868de2fff62c3ebd8af5cf533d3d224da1b332 (patch)
tree2005b555be04b5feecee7db28ea4206522af3722 /mysql-test
parent7f5ceb77689d4858875bfae7c4f2abc11534b7f1 (diff)
downloadmariadb-git-29868de2fff62c3ebd8af5cf533d3d224da1b332.tar.gz
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
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/fulltext3.result12
-rw-r--r--mysql-test/t/fulltext3.test15
2 files changed, 27 insertions, 0 deletions
diff --git a/mysql-test/r/fulltext3.result b/mysql-test/r/fulltext3.result
index 4ec48369ad1..c0b871cd5a7 100644
--- a/mysql-test/r/fulltext3.result
+++ b/mysql-test/r/fulltext3.result
@@ -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;
diff --git a/mysql-test/t/fulltext3.test b/mysql-test/t/fulltext3.test
index 1b6a07c540f..66f940b495e 100644
--- a/mysql-test/t/fulltext3.test
+++ b/mysql-test/t/fulltext3.test
@@ -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;