summaryrefslogtreecommitdiff
path: root/storage/myisam/mi_check.c
diff options
context:
space:
mode:
authorRamil Kalimullin <ramil@mysql.com>2009-01-26 10:35:15 +0400
committerRamil Kalimullin <ramil@mysql.com>2009-01-26 10:35:15 +0400
commit01511453102aa18fb8933927d80eccdeef501c68 (patch)
tree5abc1ae29b07ce3e199f41e4dfcab29a2f6a4d70 /storage/myisam/mi_check.c
parent75342ddd345457753da016a5387584e742a1eb74 (diff)
downloadmariadb-git-01511453102aa18fb8933927d80eccdeef501c68.tar.gz
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).
Diffstat (limited to 'storage/myisam/mi_check.c')
-rw-r--r--storage/myisam/mi_check.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c
index b132000b356..bdca1a1f0b8 100644
--- a/storage/myisam/mi_check.c
+++ b/storage/myisam/mi_check.c
@@ -2397,7 +2397,7 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
Note, built-in parser is always nr. 0 - see ftparser_call_initializer()
*/
- if (sort_param.keyinfo->ftparser_nr == 0)
+ if (sort_param.keyinfo->ftkey_nr == 0)
{
/*
for built-in parser the number of generated index entries
@@ -2895,6 +2895,9 @@ int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
sort_param[0].fix_datafile= (my_bool)(! rep_quick);
sort_param[0].calc_checksum= test(param->testflag & T_CALC_CHECKSUM);
+ if (!ftparser_alloc_param(info))
+ goto err;
+
sort_info.got_error=0;
pthread_mutex_lock(&sort_info.mutex);