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 | |
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')
-rw-r--r-- | myisam/mi_cache.c | 4 | ||||
-rw-r--r-- | myisam/mi_check.c | 24 | ||||
-rw-r--r-- | myisam/mi_packrec.c | 2 | ||||
-rw-r--r-- | myisam/myisamchk.c | 4 |
4 files changed, 19 insertions, 15 deletions
diff --git a/myisam/mi_cache.c b/myisam/mi_cache.c index 0e630cae22b..69a1cb0d7a5 100644 --- a/myisam/mi_cache.c +++ b/myisam/mi_cache.c @@ -73,7 +73,7 @@ int _mi_read_cache(IO_CACHE *info, byte *buff, my_off_t pos, uint length, if (!(flag & READING_HEADER) || info->error == -1 || (uint) info->error+in_buff_length < 3) { - if (!my_errno) + if (!my_errno || my_errno == -1) my_errno=HA_ERR_WRONG_IN_RECORD; DBUG_RETURN(1); } @@ -87,7 +87,7 @@ int _mi_read_cache(IO_CACHE *info, byte *buff, my_off_t pos, uint length, if (!(flag & READING_HEADER) || (int) read_length == -1 || read_length+in_buff_length < 3) { - if (!my_errno) + if (!my_errno || my_errno == -1) my_errno=HA_ERR_WRONG_IN_RECORD; DBUG_RETURN(1); } 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; } diff --git a/myisam/mi_packrec.c b/myisam/mi_packrec.c index be7f9dcae0a..68d546b2010 100644 --- a/myisam/mi_packrec.c +++ b/myisam/mi_packrec.c @@ -962,7 +962,7 @@ int _mi_read_rnd_pack_record(MI_INFO *info, byte *buf, b_type=_mi_pack_get_block_info(info,&block_info,info->dfile,filepos, info->rec_buff); if (b_type) - goto err; + goto err; /* Error code is already set */ #ifndef DBUG_OFF if (block_info.rec_len > share->max_pack_length) { diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c index ec3f0c8dca4..996e4749e53 100644 --- a/myisam/myisamchk.c +++ b/myisam/myisamchk.c @@ -201,7 +201,7 @@ static struct option long_options[] = static void print_version(void) { - printf("%s Ver 1.49 for %s at %s\n",my_progname,SYSTEM_TYPE, + printf("%s Ver 1.50 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE); } @@ -953,7 +953,7 @@ static void descript(MI_CHECK *param, register MI_INFO *info, my_string name) share->base.raid_chunks, share->base.raid_chunksize); } - if (share->options & HA_OPTION_CHECKSUM) + if (share->options & (HA_OPTION_CHECKSUM | HA_OPTION_COMPRESS_RECORD)) printf("Checksum: %23s\n",llstr(info->s->state.checksum,llbuff)); ; if (share->options & HA_OPTION_DELAY_KEY_WRITE) |