mariadb/mysql-test/suite
Marko Mäkelä 9199d72759 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 15:25:59 +02:00
..
archive Merge branch '10.0' into 10.1 2016-03-21 13:02:53 +01:00
binlog Merge branch '10.0' into 10.1 2016-08-25 12:40:09 +02:00
csv MDEV-8682 - CSV engine does not properly process "", in quotes 2015-09-28 12:04:26 +04:00
encryption MDEV-10739: encryption.innodb-page_encryption_compression fails with timeout on valgrind 2016-11-29 08:35:51 +02:00
engines Adding collations 2016-05-30 16:56:29 +04:00
federated Merge branch '10.0' into 10.1 2016-02-23 21:35:05 +01:00
funcs_1 Merge branch '10.0' into 10.0-galera 2016-08-24 19:30:32 -04:00
funcs_2
galera Merge branch 'bb-mdev-11016' into 10.1 2016-11-22 16:17:05 +05:30
galera_3nodes Merge branch '10.0-galera' into 10.1 2016-11-02 13:44:07 +01:00
handler MDEV-9155 Enabling Defragmenting in 10.1.8 still causes OPTIMIZE TABLE to take metadatalocks 2016-05-05 01:05:05 +02:00
heap
innodb MDEV-11236 Failing assertion: state == TRX_STATE_NOT_STARTED 2016-12-02 16:25:47 +02:00
innodb_fts MDEV-11233 CREATE FULLTEXT INDEX with a token longer than 127 bytes 2016-12-05 15:25:59 +02:00
innodb_zip MDEV-10686: innodb_zip.innodb_prefix_index_liftedlimit failed with timeout in buildbot 2016-11-29 08:41:45 +02:00
jp Merge branch 'github/10.0-galera' into 10.1 2015-11-19 17:48:36 +01:00
large_tests
maria MDEV-10759 Fix Aria to support 2-byte collation IDs 2016-12-02 14:05:16 +02:00
mtr/t
mtr2
multi_source Merge branch '10.0' into 10.1 2016-03-21 13:02:53 +01:00
ndb
optimizer_unfixed_bugs Merge branch '10.0' into 10.1 2015-12-21 21:24:22 +01:00
parts MDEV-9590: Always print "Engine-independent statistic" warnings and might be filtering columns unintentionally from engines 2016-03-21 11:48:04 +01:00
percona
perfschema Merge tag 'mariadb-10.0.28' into 10.0-galera 2016-10-28 15:50:13 -04:00
perfschema_stress
plugins Merge branch '10.0' into 10.1 2016-09-28 17:55:28 +02:00
roles Merge branch '10.0' into 10.1 2016-06-28 22:01:55 +02:00
rpl Merge branch 'mdev10863' into 10.1 2016-11-15 13:10:21 +01:00
storage_engine MDEV-8859 rpl.rpl_mdev382 sporadically fails to finish due to disappeared expect file 2016-06-12 20:14:51 +03:00
stress Merge branch '10.0' into 10.1 2016-03-21 13:02:53 +01:00
sys_vars Follow-up for MDEV-9451 - fix XtraDB rdiff files 2016-12-05 03:13:28 +02:00
unit
vcol Merge branch '10.0' into 10.1 2016-07-13 12:09:59 +02:00
wsrep MDEV-10993: wsrep.mdev_10186 result depends on location of galera library 2016-11-02 09:45:43 -04:00