summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorunknown <serg@serg.mysql.com>2003-01-26 12:27:29 +0100
committerunknown <serg@serg.mysql.com>2003-01-26 12:27:29 +0100
commit0412d6522df46e6ad357723d262b2b87130fba2f (patch)
tree1b2083af0f16430866670a21030213a922634adc /myisam
parent3229ddaaac84edf1706fda8cc3c35a4071aa51eb (diff)
downloadmariadb-git-0412d6522df46e6ad357723d262b2b87130fba2f.tar.gz
fixed bug in parallel repair
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_check.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c
index b65e963bcb7..0db09e669cf 100644
--- a/myisam/mi_check.c
+++ b/myisam/mi_check.c
@@ -2129,7 +2129,7 @@ int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
const char * name, int rep_quick)
{
int got_error;
- uint i,key, total_key_length;
+ uint i,key, total_key_length, istep;
ulong rec_length;
ha_rows start_records;
my_off_t new_header_length,del;
@@ -2264,8 +2264,8 @@ int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
info->state->records=info->state->del=share->state.split=0;
info->state->empty=0;
- for (i=key=0 ; key < share->base.keys ;
- rec_per_key_part+=sort_param[i].keyinfo->keysegs, i++, key++)
+ for (i=key=0, istep=1 ; key < share->base.keys ;
+ rec_per_key_part+=sort_param[i].keyinfo->keysegs, i+=istep, key++)
{
sort_param[i].key=key;
sort_param[i].keyinfo=share->keyinfo+key;
@@ -2276,9 +2276,10 @@ int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
(char*) (share->state.rec_per_key_part+
(uint) (rec_per_key_part - param->rec_per_key_part)),
sort_param[i].keyinfo->keysegs*sizeof(*rec_per_key_part));
- i--;
+ istep=0;
continue;
}
+ istep=1;
if ((!(param->testflag & T_SILENT)))
printf ("- Fixing index %d\n",key+1);
sort_param[i].key_read= ((sort_param[i].keyinfo->flag & HA_FULLTEXT) ?