summaryrefslogtreecommitdiff
path: root/isam
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2000-09-29 00:58:16 +0300
committerunknown <monty@donna.mysql.com>2000-09-29 00:58:16 +0300
commitc33289a3a19431b833d7fe06cbfb7f57747cc9b6 (patch)
treeb7b27884a7a1c424b00084acf096abc9155bcb32 /isam
parent3a5ab655f175d86e9c7f4eab290933ffa622eeaf (diff)
downloadmariadb-git-c33289a3a19431b833d7fe06cbfb7f57747cc9b6.tar.gz
Fixed indention, removed compiler varnings and fixed a bug
in FULLTEXT indexes. Docs/manual.texi: Removed some @ifset nushere tags which crashed the manual when using emacs client/mysql-test.c: ***MISSING WEAVE*** heap/hp_test2.c: Removed compiler warnings isam/pack_isam.c: Removed compiler warnings isam/update.c: Removed compiler warnings myisam/ft_parser.c: cleanup myisam/ft_update.c: Fixed crash when inserting a blob which was NULL myisam/mi_check.c: -e continues checking of other keys on error myisam/mi_rkey.c: cleanup myisam/myisamchk.c: cleanup myisam/myisamlog.c: Added use of rnd to make things more predictable myisammrg/myrg_rkey.c: Removed compiler warnings mysys/mf_pack.c: cleanup mysys/my_fstream.c: cleanup sql/ha_berkeley.cc: cleanup sql/handler.cc: cleanup sql/item_func.cc: cleanup sql/item_func.h: cleanup sql/net_serv.cc: cleanup sql/slave.cc: cleanup sql/sql_class.cc: cleanup sql/sql_show.cc: cleanup
Diffstat (limited to 'isam')
-rw-r--r--isam/pack_isam.c18
-rw-r--r--isam/update.c10
2 files changed, 13 insertions, 15 deletions
diff --git a/isam/pack_isam.c b/isam/pack_isam.c
index 9193f52a863..1040096fa4a 100644
--- a/isam/pack_isam.c
+++ b/isam/pack_isam.c
@@ -574,9 +574,9 @@ static int compress(MRG_INFO *mrg,char *result_table)
end_file_buffer();
if (verbose && mrg->records)
- printf("Min record length: %6d Max length: %6d Mean total length: %6d\n",
+ printf("Min record length: %6d Max length: %6d Mean total length: %6lu\n",
mrg->min_pack_length,mrg->max_pack_length,
- (long) new_length/mrg->records);
+ (ulong) new_length/mrg->records);
if (!test_only)
{
@@ -763,11 +763,11 @@ static int get_statistic(MRG_INFO *mrg,HUFF_COUNTS *huff_counts)
{
global_count=count;
if (!(element=tree_insert(&count->int_tree,pos,0)) ||
- element->count == 1 &&
- count->tree_buff + tree_buff_length <
- count->tree_pos + count->field_length ||
- count->field_length == 1 &&
- count->int_tree.elements_in_tree > 1)
+ (element->count == 1 &&
+ count->tree_buff + tree_buff_length <
+ count->tree_pos + count->field_length ||
+ count->field_length == 1 &&
+ count->int_tree.elements_in_tree > 1))
{
delete_tree(&count->int_tree);
my_free(count->tree_buff,MYF(0));
@@ -1760,8 +1760,8 @@ static int compress_isam_file(MRG_INFO *mrg, HUFF_COUNTS *huff_counts)
if (max_record_length >= max_allowed_length)
{
fprintf(stderr,
- "Error: Found record with packed-length: %d, max is: %d\n",
- max_record_length,max_allowed_length);
+ "Error: Found record with packed-length: %d, max is: %lu\n",
+ max_record_length, (ulong) max_allowed_length);
error=1;
break;
}
diff --git a/isam/update.c b/isam/update.c
index ffcea740986..82dab4140e3 100644
--- a/isam/update.c
+++ b/isam/update.c
@@ -31,6 +31,7 @@ int nisam_update(register N_INFO *info, const byte *oldrec, const byte *newrec)
uchar old_key[N_MAX_KEY_BUFF],*new_key;
DBUG_ENTER("nisam_update");
+ LINT_INIT(save_errno);
if (!(info->update & HA_STATE_AKTIV))
{
my_errno=HA_ERR_KEY_NOT_FOUND;
@@ -54,7 +55,7 @@ int nisam_update(register N_INFO *info, const byte *oldrec, const byte *newrec)
info->s->base.max_key_file_length -
info->s->blocksize* INDEX_BLOCK_MARGIN *info->s->state.keys)
{
- my_errno=HA_ERR_INDEX_FILE_FULL;
+ save_errno=HA_ERR_INDEX_FILE_FULL;
goto err_end;
}
@@ -108,12 +109,9 @@ err:
info->update= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED | HA_STATE_AKTIV |
key_changed);
err_end:
- nisam_log_record(LOG_UPDATE,info,newrec,info->lastpos,my_errno);
+ nisam_log_record(LOG_UPDATE,info,newrec,info->lastpos,save_errno);
VOID(_nisam_writeinfo(info,1));
allow_break(); /* Allow SIGHUP & SIGINT */
- if (save_errno == HA_ERR_KEY_NOT_FOUND)
- my_errno=HA_ERR_CRASHED;
- else
- my_errno=save_errno;
+ my_errno=(save_errno == HA_ERR_KEY_NOT_FOUND) ? HA_ERR_CRASHED : save_errno;
DBUG_RETURN(-1);
} /* nisam_update */