summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2001-10-02 21:08:08 +0300
committermonty@hundin.mysql.fi <>2001-10-02 21:08:08 +0300
commitd28f23c14ffc8b0a738a2c3bda3d0d4d9c075e9b (patch)
tree10d5cc825ed60eb9400958861f0101e212097efb /myisam
parenta99b7e77cdd839a46f90efdab57c9cc843805393 (diff)
downloadmariadb-git-d28f23c14ffc8b0a738a2c3bda3d0d4d9c075e9b.tar.gz
Fixed bug in INSERT DELAYED
Fixed some problems in SHOW CREATE TABLE Fixed calculation of checksums in myisamchk
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_check.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c
index fa4687e27f5..93598ce2d76 100644
--- a/myisam/mi_check.c
+++ b/myisam/mi_check.c
@@ -1194,8 +1194,6 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info,
param->glob_crc=0;
if (param->testflag & T_CALC_CHECKSUM)
param->calc_checksum=1;
- if (!rep_quick)
- share->state.checksum=0;
info->update= (short) (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
for (i=0 ; i < info->s->base.keys ; i++)
@@ -1290,9 +1288,9 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info,
else
{
info->state->data_file_length=sort_info->max_pos;
- if (param->testflag & T_CALC_CHECKSUM)
- share->state.checksum=param->glob_crc;
}
+ if (param->testflag & T_CALC_CHECKSUM)
+ share->state.checksum=param->glob_crc;
if (!(param->testflag & T_SILENT))
{
@@ -1878,8 +1876,6 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
param->glob_crc=0;
if (param->testflag & T_CALC_CHECKSUM)
param->calc_checksum=1;
- if (! rep_quick)
- share->state.checksum=0;
rec_per_key_part= param->rec_per_key_part;
for (sort_info->key=0 ; sort_info->key < share->base.keys ;
@@ -1999,7 +1995,7 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
"Can't change size of datafile, error: %d",
my_errno);
}
- else if (param->testflag & T_CALC_CHECKSUM)
+ if (param->testflag & T_CALC_CHECKSUM)
share->state.checksum=param->glob_crc;
if (my_chsize(share->kfile,info->state->key_file_length,MYF(0)))
@@ -2478,7 +2474,7 @@ int sort_write_record(SORT_INFO *sort_info)
DBUG_RETURN(1);
}
sort_info->filepos+=share->base.pack_reclength;
- info->s->state.checksum+=mi_static_checksum(info, sort_info->record);
+ /* sort_info->param->glob_crc+=mi_static_checksum(info, sort_info->record); */
break;
case DYNAMIC_RECORD:
if (! info->blobs)
@@ -2502,7 +2498,7 @@ int sort_write_record(SORT_INFO *sort_info)
}
info->checksum=mi_checksum(info,sort_info->record);
reclength=_mi_rec_pack(info,from,sort_info->record);
- info->s->state.checksum+=info->checksum;
+ /* sort_info->param->glob_crc+=info->checksum; */
block_length=reclength+ 3 + test(reclength >= (65520-3));
if (block_length < share->base.min_block_length)
block_length=share->base.min_block_length;
@@ -2516,7 +2512,7 @@ int sort_write_record(SORT_INFO *sort_info)
DBUG_RETURN(1);
}
sort_info->filepos+=block_length;
- info->s->state.checksum+=info->checksum;
+ /* sort_info->param->glob_crc+=info->checksum; */
break;
case COMPRESSED_RECORD:
reclength=info->packed_length;
@@ -2529,7 +2525,7 @@ int sort_write_record(SORT_INFO *sort_info)
mi_check_print_error(param,"%d when writing to datafile",my_errno);
DBUG_RETURN(1);
}
- info->s->state.checksum+=info->checksum;
+ /* sort_info->param->glob_crc+=info->checksum; */
sort_info->filepos+=reclength+length;
break;
}
@@ -2746,9 +2742,9 @@ static int sort_delete_record(MI_CHECK *param)
DBUG_RETURN(1);
}
}
- if (info->s->calc_checksum)
- info->s->state.checksum-=(*info->s->calc_checksum)(info,
- sort_info->record);
+ if (param->calc_checksum)
+ param->glob_crc-=(*info->s->calc_checksum)(info,
+ sort_info->record);
}
error=flush_io_cache(&info->rec_cache) || (*info->s->delete_record)(info);
info->dfile=old_file; /* restore actual value */