mariadb/mysql-test/suite/innodb_fts/t
Marko Mäkelä cc85ba8f2e MDEV-11233 CREATE FULLTEXT INDEX with a token longer than 127 bytes
crashes server

This bug is the result of merging the Oracle MySQL follow-up fix
BUG#22963169 MYSQL CRASHES ON CREATE FULLTEXT INDEX
without merging the base bug fix:
Bug#79475 Insert a token of 84 4-bytes chars into fts index causes
server crash.

Unlike the above mentioned fixes in MySQL, our fix will not change
the storage format of fulltext indexes in InnoDB or XtraDB
when a character encoding with mbmaxlen=2 or mbmaxlen=3
and the length of a word is between 128 and 84*mbmaxlen bytes.
The Oracle fix would allocate 2 length bytes for these cases.

Compatibility with other MySQL and MariaDB releases is ensured by
persisting the used maximum length in the SYS_COLUMNS table in the
InnoDB data dictionary.

This fix also removes some unnecessary strcmp() calls when checking
for the legacy default collation my_charset_latin1
(my_charset_latin1.name=="latin1_swedish_ci").

fts_create_one_index_table(): Store the actual length in bytes.
This metadata will be written to the SYS_COLUMNS table.

fts_zip_initialize(): Initialize only the first byte of the buffer.
Actually the code should not even care about this first byte, because
the length is set as 0.

FTX_MAX_WORD_LEN: Define as HA_FT_MAXCHARLEN * 4 aka 336 bytes,
not as 254 bytes.

row_merge_create_fts_sort_index(): Set the actual maximum length of the
column in bytes, similar to fts_create_one_index_table().

row_merge_fts_doc_tokenize(): Remove the redundant parameter word_dtype.
Use the actual maximum length of the column. Calculate the extra_size
in the same way as row_merge_buf_encode() does.
2016-12-05 16:32:03 +02:00
..
create.opt MDEV-11233 CREATE FULLTEXT INDEX with a token longer than 127 bytes 2016-12-05 16:32:03 +02:00
create.test MDEV-11233 CREATE FULLTEXT INDEX with a token longer than 127 bytes 2016-12-05 16:32:03 +02:00
fulltext.test MDEV-5574 Set AUTO_INCREMENT below max value of column. 2014-02-01 09:33:26 +01:00
fulltext2.test Percona-Server-5.6.14-rel62.0 merge 2013-12-22 17:06:50 +01:00
fulltext3.test Innodb full text search tests. 2013-09-24 16:47:33 +03:00
fulltext_cache.test Innodb full text search tests. 2013-09-24 16:47:33 +03:00
fulltext_distinct.test Innodb full text search tests. 2013-09-24 16:47:33 +03:00
fulltext_left_join.test MDEV-5574 Set AUTO_INCREMENT below max value of column. 2014-02-01 09:33:26 +01:00
fulltext_misc.test sort a non-deterministic test result 2015-01-15 08:55:00 +01:00
fulltext_multi.test Innodb full text search tests. 2013-09-24 16:47:33 +03:00
fulltext_order_by.test MDEV-334: Backport of UNION ALL optimization from mysql-5.7. 2014-10-14 09:36:50 -07:00
fulltext_update.test Innodb full text search tests. 2013-09-24 16:47:33 +03:00
fulltext_var.test Percona-Server-5.6.14-rel62.0 merge 2013-12-22 17:06:50 +01:00
innobase_drop_fts_index_table.test Innodb full text search tests. 2013-09-24 16:47:33 +03:00
innodb-fts-basic.test Percona-Server-5.6.14-rel62.0 merge 2013-12-22 17:06:50 +01:00
innodb-fts-ddl.test Innodb full text search tests. 2013-09-24 16:47:33 +03:00
innodb-fts-fic.test Fix innodb_fts suite 2016-09-14 15:10:47 +02:00
innodb-fts-stopword.opt Innodb full text search tests. 2013-09-24 16:47:33 +03:00
innodb-fts-stopword.test MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
innodb_fts_large_records.test Innodb full text search tests. 2013-09-24 16:47:33 +03:00
innodb_fts_misc.test MDEV-5574 Set AUTO_INCREMENT below max value of column. 2014-02-01 09:33:26 +01:00
innodb_fts_misc_1.test Fix innodb_fts suite 2016-09-14 15:10:47 +02:00
innodb_fts_misc_debug.test Innodb full text search tests. 2013-09-24 16:47:33 +03:00
innodb_fts_multiple_index.test Innodb full text search tests. 2013-09-24 16:47:33 +03:00
innodb_fts_plugin.test Fix innodb_fts suite 2016-09-14 15:10:47 +02:00
innodb_fts_proximity.test Fix innodb_fts suite 2016-09-14 15:10:47 +02:00
innodb_fts_result_cache_limit.test MDEV-5574 Set AUTO_INCREMENT below max value of column. 2014-02-01 09:33:26 +01:00
innodb_fts_stopword_charset.test MDEV-5574 Set AUTO_INCREMENT below max value of column. 2014-02-01 09:33:26 +01:00
innodb_fts_transaction.test MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00