diff options
author | unknown <monty@hundin.mysql.fi> | 2001-08-18 10:49:00 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-08-18 10:49:00 +0300 |
commit | d01f2efebfd97c63b41f609bf887c92c883fc229 (patch) | |
tree | 6a8da232a534ba4330a0b544076af5db929af91b /myisam/mi_check.c | |
parent | f6751dd8db31161f6eaa0a80aa8cf1b8f9c930c3 (diff) | |
download | mariadb-git-d01f2efebfd97c63b41f609bf887c92c883fc229.tar.gz |
Portability fixes.
Let myisamchk generate a new checksum for compressed data.
Don't unconditionally force filenames to lower case on windows.
Update mysqltest to match 4.0 source (to get some of the new bug fixes into 3.23)
Docs/manual.texi:
Link changes, and new comments about IA64 and about Sun workshop
client/mysqltest.c:
Updated this to match the 4.0 source
include/config-win.h:
Don't unconditionally force filenames to lower case on windows.
innobase/include/ut0ut.h:
Portability fix
myisam/mi_cache.c:
Fix problem where reported error number was -1
myisam/mi_check.c:
Let myisamchk generate a new checksum for compressed data.
myisam/mi_packrec.c:
Cleanup
myisam/myisamchk.c:
Report checksum for compressed tables
mysql-test/t/bdb.test:
Fix to match new mysqltest
mysql-test/t/err000001.test:
Fix to match new mysqltest
mysql-test/t/fulltext.test:
Fix to match new mysqltest
mysql-test/t/innodb.test:
Fix to match new mysqltest
mysql-test/t/overflow.test:
Fix to match new mysqltest
sql/ha_gemini.cc:
Fix false -> FALSE
sql/share/estonian/errmsg.txt:
Updated of translation
sql/share/swedish/errmsg.txt:
Updated of translation
sql/sql_parse.cc:
Don't unconditionally force filenames to lower case on windows.
sql/sql_table.cc:
Don't unconditionally force filenames to lower case on windows.
sql/sql_test.cc:
Write current directory when using 'mysqladmin debug'
strings/strto.c:
Portability fix
strings/strtoll.c:
Portability fix
strings/strtoul.c:
Portability fix
strings/strtoull.c:
Portability fix
Diffstat (limited to 'myisam/mi_check.c')
-rw-r--r-- | myisam/mi_check.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/myisam/mi_check.c b/myisam/mi_check.c index 0caedbe1a51..64bc5d7b8e5 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -708,7 +708,7 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend) puts("- check record links"); } - if (!(record= (byte*) my_alloca(info->s->base.pack_reclength))) + if (!(record= (byte*) my_malloc(info->s->base.pack_reclength,MYF(0)))) { mi_check_print_error(param,"Not Enough memory"); DBUG_RETURN(-1); @@ -924,8 +924,9 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend) if (block_info.rec_len < (uint) info->s->min_pack_length || block_info.rec_len > (uint) info->s->max_pack_length) { - mi_check_print_error(param,"Found block with wrong recordlength: %d at %s", - block_info.rec_len, llstr(start_recpos,llbuff)); + mi_check_print_error(param, + "Found block with wrong recordlength: %d at %s", + block_info.rec_len, llstr(start_recpos,llbuff)); got_error=1; break; } @@ -934,7 +935,8 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend) goto err; if (_mi_pack_rec_unpack(info,record,info->rec_buff,block_info.rec_len)) { - mi_check_print_error(param,"Found wrong record at %s", llstr(start_recpos,llbuff)); + mi_check_print_error(param,"Found wrong record at %s", + llstr(start_recpos,llbuff)); got_error=1; } if (static_row_size) @@ -1082,12 +1084,12 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend) printf("Lost space: %12s Linkdata: %10s\n", llstr(empty,llbuff),llstr(link_used,llbuff2)); } - my_afree((gptr) record); + my_free((gptr) record,MYF(0)); DBUG_RETURN (error); err: - mi_check_print_error(param,"got error: %d when reading datafile",my_errno); + mi_check_print_error(param,"got error: %d when reading datafile at record: %s",my_errno, llstr(records,llbuff)); err2: - my_afree((gptr) record); + my_free((gptr) record,MYF(0)); param->retry_without_quick=1; DBUG_RETURN(1); } /* chk_data_link */ @@ -1188,7 +1190,7 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info, del=info->state->del; info->state->records=info->state->del=share->state.split=0; info->state->empty=0; - if (sort_info->new_data_file_type != COMPRESSED_RECORD && !rep_quick) + 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++) @@ -1866,8 +1868,7 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info, sort_param.sort_info=sort_info; del=info->state->del; - if (sort_info->new_data_file_type != COMPRESSED_RECORD && - ! rep_quick) + if (! rep_quick) share->state.checksum=0; rec_per_key_part= param->rec_per_key_part; @@ -2414,6 +2415,7 @@ static int sort_get_next_record(SORT_INFO *sort_info) llstr(sort_info->pos,llbuff)); continue; } + info->checksum=mi_checksum(info,sort_info->record); if (!sort_info->fix_datafile) sort_info->filepos=sort_info->pos; sort_info->max_pos=(sort_info->pos=block_info.filepos+ @@ -2492,6 +2494,7 @@ int sort_write_record(SORT_INFO *sort_info) DBUG_RETURN(1); } sort_info->filepos+=block_length; + info->s->state.checksum+=info->checksum; break; case COMPRESSED_RECORD: reclength=info->packed_length; @@ -2504,6 +2507,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->filepos+=reclength+length; break; } |