mariadb/storage/xtradb
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
..
api MDEV-7769 MY_CHARSET_INFO refactoring# On branch 10.2 2016-10-10 14:36:09 +04:00
btr MDEV-11349 (1/2) Fix some clang 4.0 warnings 2016-11-25 12:43:34 +02:00
buf MDEV-11349 (2/2) Fix some bogus-looking Valgrind warnings 2016-11-25 12:43:43 +02:00
data 5.6.31-77.0 2016-08-10 19:24:58 +02:00
dict MDEV-11349 (1/2) Fix some clang 4.0 warnings 2016-11-25 12:43:34 +02:00
dyn
eval
fil Merge branch '10.1' into 10.2 2016-09-09 08:33:08 +02:00
fsp Merge branch '10.0' into 10.1 2016-08-25 12:40:09 +02:00
fts MDEV-11233 CREATE FULLTEXT INDEX with a token longer than 127 bytes 2016-12-05 16:32:03 +02:00
fut
ha
handler MDEV-11233 CREATE FULLTEXT INDEX with a token longer than 127 bytes 2016-12-05 16:32:03 +02:00
ibuf MDEV-11349 (1/2) Fix some clang 4.0 warnings 2016-11-25 12:43:34 +02:00
include MDEV-11233 CREATE FULLTEXT INDEX with a token longer than 127 bytes 2016-12-05 16:32:03 +02:00
lock MDEV-10692: InnoDB: Failing assertion: lock->trx->lock.wait_lock == lock 2016-11-09 13:32:43 +02:00
log Merge branch '10.1' into 10.2 2016-09-09 08:33:08 +02:00
mach
mem 5.6.31-77.0 2016-08-10 19:24:58 +02:00
mtr Merge branch '10.0' into 10.1 2016-08-25 12:40:09 +02:00
mysql-test/storage_engine
os Merge branch '10.1' into 10.2 2016-09-09 08:33:08 +02:00
page MDEV-11349 (1/2) Fix some clang 4.0 warnings 2016-11-25 12:43:34 +02:00
pars Merge branch '10.0' into 10.1 2016-08-25 12:40:09 +02:00
que
read
rem Merge branch '10.0' into 10.1 2016-08-25 12:40:09 +02:00
row MDEV-11233 CREATE FULLTEXT INDEX with a token longer than 127 bytes 2016-12-05 16:32:03 +02:00
srv Merge branch '10.1' into 10.2 2016-09-09 08:33:08 +02:00
sync MDEV-11349 (1/2) Fix some clang 4.0 warnings 2016-11-25 12:43:34 +02:00
trx MDEV-11236 Failing assertion: state == TRX_STATE_NOT_STARTED 2016-12-02 16:44:53 +02:00
usr
ut
CMakeLists.txt MDEV-11195: Simplify enablement of NUMA in innodb/xtradb 2016-11-02 14:37:43 +11:00
COPYING.Google
COPYING.Percona
Doxyfile
ha_innodb.def