| 1 |
# Test fulltext with ngram parser |
| 2 |
|
| 3 |
--source include/no_valgrind_without_big.inc |
| 4 |
--source include/have_innodb_max_16k.inc |
| 5 |
|
| 6 |
|
| 7 |
# Because we have inserted row size > 2k, we require page size > 4k. |
| 8 |
if (`SELECT COUNT(*) = 1 FROM performance_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value = 4096`) |
| 9 |
{ |
| 10 |
--skip Test requires InnoDB with Page size > 4k |
| 11 |
} |
| 12 |
|
| 13 |
LET $per_table = `select @@innodb_file_per_table`; |
| 14 |
|
| 15 |
-- echo # Test Case : With default row type |
| 16 |
LET $table_row_format = ROW_FORMAT=DEFAULT ; |
| 17 |
--source suite/innodb_fts/include/ngram.inc |
| 18 |
|
| 19 |
-- echo # Test Case : with compact row type |
| 20 |
LET $table_row_format = ROW_FORMAT=COMPACT ; |
| 21 |
--source suite/innodb_fts/include/ngram.inc |
| 22 |
|
| 23 |
|
| 24 |
-- echo # Test Case : With redundant row type |
| 25 |
LET $table_row_format = ROW_FORMAT=REDUNDANT ; |
| 26 |
--source suite/innodb_fts/include/ngram.inc |
| 27 |
|
| 28 |
|
| 29 |
-- echo # Test Case : With Dynamic row type |
| 30 |
LET $table_row_format = ROW_FORMAT=DYNAMIC ; |
| 31 |
--source suite/innodb_fts/include/ngram.inc |
| 32 |
|
| 33 |
|
| 34 |
-- echo # Test Case : With compressed row type |
| 35 |
LET $table_row_format = ROW_FORMAT=COMPRESSED ; |
| 36 |
--source suite/innodb_fts/include/ngram.inc |
| 37 |
|
| 38 |
EVAL SET GLOBAL innodb_file_per_table = $per_table; |
| 39 |
|
| 40 |
# |
| 41 |
## Bug #25873310 FULLTEXT SEARCH CAN NOT FIND WORD WHICH CONTAINS "," OR "." |
| 42 |
# |
| 43 |
|
| 44 |
SET GLOBAL innodb_ft_enable_stopword=OFF; |
| 45 |
SET innodb_ft_enable_stopword=OFF; |
| 46 |
|
| 47 |
let @old_innodb_ft_aux_table = `select @@innodb_ft_aux_table`; |
| 48 |
CREATE TABLE ft_test3( |
| 49 |
id INT NOT NULL, |
| 50 |
contents TEXT, |
| 51 |
PRIMARY KEY(id), |
| 52 |
FULLTEXT INDEX fx_contents(contents) WITH PARSER NGRAM |
| 53 |
) ENGINE=INNODB; |
| 54 |
|
| 55 |
SET GLOBAL innodb_ft_aux_table='test/ft_test3'; |
| 56 |
INSERT INTO ft_test3 VALUES (1, 'xy,yz'); |
| 57 |
|
| 58 |
SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE ORDER BY position; |
| 59 |
SELECT * FROM ft_test3 WHERE MATCH(contents) AGAINST('y,' IN BOOLEAN MODE); |
| 60 |
SELECT * FROM ft_test3 WHERE MATCH(contents) AGAINST('y,' IN NATURAl LANGUAGE MODE); |
| 61 |
|
| 62 |
SET GLOBAL innodb_ft_enable_stopword = ON; |
| 63 |
SET GLOBAL innodb_ft_aux_table = @old_innodb_ft_aux_table; |
| 64 |
DROP TABLE ft_test3; |