summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/innodb_fts/t/fulltext_var.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:07:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:07:14 +0000
commita175314c3e5827eb193872241446f2f8f5c9d33c (patch)
treecd3d60ca99ae00829c52a6ca79150a5b6e62528b /mysql-test/suite/innodb_fts/t/fulltext_var.test
parentInitial commit. (diff)
downloadmariadb-10.5-a175314c3e5827eb193872241446f2f8f5c9d33c.tar.xz
mariadb-10.5-a175314c3e5827eb193872241446f2f8f5c9d33c.zip
Adding upstream version 1:10.5.12.upstream/1%10.5.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/innodb_fts/t/fulltext_var.test')
-rw-r--r--mysql-test/suite/innodb_fts/t/fulltext_var.test39
1 files changed, 39 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb_fts/t/fulltext_var.test b/mysql-test/suite/innodb_fts/t/fulltext_var.test
new file mode 100644
index 00000000..2b94aa58
--- /dev/null
+++ b/mysql-test/suite/innodb_fts/t/fulltext_var.test
@@ -0,0 +1,39 @@
+#
+# Fulltext configurable parameters
+#
+--source include/have_innodb.inc
+
+# Save ft_boolean_syntax variable
+let $saved_ft_boolean_syntax=`select @@global.ft_boolean_syntax`;
+
+show variables like "ft\_%";
+
+# INNODB_FTS: Please note original table do not have fulltext index.
+# InnoDB will return 1214. I added "fulltext(b)" to the create table statement
+# In addition, we do not support MyISAM configure parameter
+create table t1 (b text not null, fulltext(b)) engine = innodb;
+insert t1 values ('aaaaaa bbbbbb cccccc');
+insert t1 values ('bbbbbb cccccc');
+insert t1 values ('aaaaaa cccccc');
+select * from t1 where match b against ('+aaaaaa bbbbbb' in boolean mode);
+-- error 1229
+set ft_boolean_syntax=' +-><()~*:""&|';
+set global ft_boolean_syntax=' +-><()~*:""&|';
+select * from t1 where match b against ('+aaaaaa bbbbbb' in boolean mode);
+set global ft_boolean_syntax='@ -><()~*:""&|';
+select * from t1 where match b against ('+aaaaaa bbbbbb' in boolean mode);
+
+--error ER_PARSE_ERROR
+select * from t1 where match b against ('+aaaaaa @bbbbbb' in boolean mode);
+-- error 1231
+set global ft_boolean_syntax='@ -><()~*:""@|';
+-- error 1231
+set global ft_boolean_syntax='+ -><()~*:""@!|';
+drop table t1;
+
+# Restore ft_boolean_syntax variable
+--disable_query_log
+eval set global ft_boolean_syntax='$saved_ft_boolean_syntax';
+--enable_query_log
+
+# End of 4.1 tests