summaryrefslogtreecommitdiff
path: root/mysql-test/suite/innodb_fts/t/fulltext.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/innodb_fts/t/fulltext.test')
-rw-r--r--mysql-test/suite/innodb_fts/t/fulltext.test33
1 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb_fts/t/fulltext.test b/mysql-test/suite/innodb_fts/t/fulltext.test
index 4878a0bee3f..2cf82d0fe90 100644
--- a/mysql-test/suite/innodb_fts/t/fulltext.test
+++ b/mysql-test/suite/innodb_fts/t/fulltext.test
@@ -757,4 +757,37 @@ INSERT INTO t1 (col_int, col_text) VALUES ( 1255, NULL);
DROP TABLE t1;
SET @@global.innodb_file_per_table = @save;
+--echo #
+--echo # MDEV-20797 FULLTEXT search with apostrophe,
+--echo # and mandatory words
+--echo #
+CREATE TABLE t1(f1 TINYTEXT NOT NULL, FULLTEXT(f1))ENGINE=InnoDB;
+INSERT INTO t1 VALUES('O''Brien'), ('O Brien'), ('Ö''Brien');
+INSERT INTO t1 VALUES('Brien'), ('O ''Brien'), ('O'' Brien');
+INSERT INTO t1 VALUES('Doh''nuts');
+SELECT * FROM t1 WHERE MATCH (f1) AGAINST ("+O'Brien" IN BOOLEAN MODE);
+SELECT * FROM t1 WHERE MATCH (f1) AGAINST ("+Doh'nuts" IN BOOLEAN MODE);
+SELECT * FROM t1 WHERE MATCH (f1) AGAINST ("+Ö''Brien" IN BOOLEAN MODE);
+DROP TABLE t1;
+
+--echo #
+--echo # MDEV-29058 Assertion `index->type == 32' failed
+--echo # in dict_index_build_internal_fts
+--echo #
+call mtr.add_suppression("InnoDB: Index `f` of table `test`.`t2` is corrupted");
+call mtr.add_suppression("InnoDB: Skip adjustment of root pages for index `f`.");
+let $MYSQLD_DATADIR = `SELECT @@datadir`;
+CREATE TABLE t1 (f CHAR(8), FULLTEXT KEY (f)) ENGINE=InnoDB;
+CREATE TABLE t2 LIKE t1;
+ALTER TABLE t2 DISCARD TABLESPACE;
+--disable_warnings
+FLUSH TABLES t1 FOR EXPORT;
+--copy_file $MYSQLD_DATADIR/test/t1.ibd $MYSQLD_DATADIR/test/t2.ibd
+--copy_file $MYSQLD_DATADIR/test/t1.cfg $MYSQLD_DATADIR/test/t2.cfg
+UNLOCK TABLES;
+ALTER TABLE t1 DISCARD TABLESPACE;
+ALTER TABLE t2 IMPORT TABLESPACE;
+--enable_warnings
+DROP TABLE t2, t1;
+
--echo # End of 10.3 tests