mariadb/storage
Ramil Kalimullin 80fe6268f7 Fix for bug #37756: enabling fulltext indexes with
myisam_repair_threads > 1 causes crash

Problem: parallel repair (myisam_repair_threads > 1) of a myisam
table with two or more fulltext keys that use the same parser may
lead to a server crash. ALTER TABLE ENABLE KEYS is affected as well.

Fix: properly initialize fulltext structures for parallel repair.

Note: 1. there's no deterministic test case.
2. now we call parser->init() for each fulltext key
(not for each fulltext parser used).


storage/myisam/ft_parser.c:
  Fix for bug #37756: enabling fulltext indexes with
    myisam_repair_threads > 1 causes crash
  
  In ftparser_call_initializer() we "group" parsers
  and allocate parameters for each unique parser used.
  In case of parallel repairing we may have a bunch
  of parsers that use the only MI_INFO structure.
  Each of these parsers must have its own parameter
  structure in order not to interfere with others.
  
  Moreover, the allocation is done without mutex
  lock so parallel ftparser_call_initializer() calls
  are unsafe.
  
  Now we don't "group" the fulltext parsers.
  Parameter allocation code moved to ftparser_alloc_param()
  function which is called from mi_repair_parallel() as well
  to allocate parameters for each parser used.
storage/myisam/ftdefs.h:
  Fix for bug #37756: enabling fulltext indexes with
    myisam_repair_threads > 1 causes crash
  
  ftparser_alloc_param(MI_INFO *info) added.
storage/myisam/mi_check.c:
  Fix for bug #37756: enabling fulltext indexes with
    myisam_repair_threads > 1 causes crash
  
  ftparser_alloc_param(info) called in case of parallel
  repair to allocate fulltext parser parameters.
storage/myisam/mi_open.c:
  Fix for bug #37756: enabling fulltext indexes with
    myisam_repair_threads > 1 causes crash
  
  set keyinfo->ftkey_nr and share->ftkeys.
2009-01-26 10:35:15 +04:00
..
archive Merge from mysql-5.1.30-release 2008-11-27 00:02:10 +01:00
blackhole Added "Sun Microsystems, Inc." to copyright headers on files modified 2008-11-10 21:21:49 +01:00
csv Bug#41441 repair csv table crashes debug server 2008-12-29 16:50:51 +04:00
example Merge trift2.:/MySQL/M51/mysql-5.1 2008-03-14 14:41:08 +01:00
federated Fix warnings and bug spotted by gcc-4.3. 2008-12-16 10:12:22 -02:00
heap Fix warnings and bug spotted by gcc-4.3. 2008-12-16 10:12:22 -02:00
innobase Add another cast to ignore int/ulong difference in error types, silence warning on Win64 2009-01-16 17:49:07 +01:00
myisam Fix for bug #37756: enabling fulltext indexes with 2009-01-26 10:35:15 +04:00
myisammrg Fixed bug#36006: Optimizer does table scan for SELECT COUNT(*) 2008-04-26 02:45:58 +05:00
ndb mysql-test/r/partition.result 2008-11-25 03:04:58 +01:00
Makefile.am Many files: 2006-12-31 02:29:11 +01:00