summaryrefslogtreecommitdiff
path: root/storage/myisam/mi_check.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/myisam/mi_check.c')
-rw-r--r--storage/myisam/mi_check.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c
index b65bb8b78bd..71ab372f2aa 100644
--- a/storage/myisam/mi_check.c
+++ b/storage/myisam/mi_check.c
@@ -2677,6 +2677,8 @@ int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info,
*/
DBUG_PRINT("info", ("is quick repair: %d", rep_quick));
bzero((char*)&sort_info,sizeof(sort_info));
+ if (!rep_quick)
+ my_b_clear(&new_data_cache);
/* Initialize pthread structures before goto err. */
mysql_mutex_init(mi_key_mutex_MI_SORT_INFO_mutex,
&sort_info.mutex, MY_MUTEX_INIT_FAST);
@@ -3056,7 +3058,7 @@ err:
already or they were not yet started (if the error happend before
creating the threads).
*/
- if (!rep_quick)
+ if (!rep_quick && my_b_inited(&new_data_cache))
(void) end_io_cache(&new_data_cache);
if (!got_error)
{