diff options
author | unknown <serg@serg.mylan> | 2003-05-04 18:43:37 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2003-05-04 18:43:37 +0200 |
commit | 3d96996983e17f01f12f7f3b3a29e14f2171facd (patch) | |
tree | 977b5ccdb2fb4dc90d4ee35d6eeb47820e42f10a /myisam | |
parent | 59d6e48992faa5c7799f9387ea430cdff58a0a08 (diff) | |
download | mariadb-git-3d96996983e17f01f12f7f3b3a29e14f2171facd.tar.gz |
parallel-repair available in mysqld
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/mi_check.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c index b23d4b2277b..a64130cf6e0 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -2246,7 +2246,17 @@ int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info, else rec_length=share->base.pack_reclength; sort_info.max_records= - ((param->testflag & T_CREATE_MISSING_KEYS) ? info->state->records : + /* +1 below is required hack for parallel repair mode. + The info->state->records value, that is compared later + to sort_info.max_records and cannot exceed it, is + increased in sort_key_write. In mi_repair_by_sort, sort_key_write + is called after sort_key_read, where the comparison is performed, + but in parallel mode master thread can call sort_key_write + before some other repair thread calls sort_key_read. + Furthermore I'm not even sure +1 would be enough. + May be sort_info.max_records shold be always set to max value in + parallel mode. */ + ((param->testflag & T_CREATE_MISSING_KEYS) ? info->state->records + 1: (ha_rows) (sort_info.filelength/rec_length+1)); del=info->state->del; |