summaryrefslogtreecommitdiff
path: root/storage/myisam
diff options
context:
space:
mode:
Diffstat (limited to 'storage/myisam')
-rw-r--r--storage/myisam/mi_check.c6
-rw-r--r--storage/myisam/mi_search.c6
-rw-r--r--storage/myisam/mi_write.c6
-rw-r--r--storage/myisam/myisamchk.c2
4 files changed, 9 insertions, 11 deletions
diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c
index 15eb28e6183..1c33ffa90f5 100644
--- a/storage/myisam/mi_check.c
+++ b/storage/myisam/mi_check.c
@@ -801,7 +801,7 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
{
DBUG_DUMP("old",(uchar*) info->lastkey, info->lastkey_length);
DBUG_DUMP("new",(uchar*) key, key_length);
- DBUG_DUMP("new_in_page",(char*) old_keypos,(uint) (keypos-old_keypos));
+ DBUG_DUMP("new_in_page",(uchar*) old_keypos,(uint) (keypos-old_keypos));
if (comp_flag & SEARCH_FIND && flag == 0)
mi_check_print_error(param,"Found duplicated key at page %s",llstr(page,llbuff));
@@ -871,7 +871,7 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
llstr(page,llbuff),llstr(record,llbuff2),
llstr(info->state->data_file_length,llbuff3)));
DBUG_DUMP("key",(uchar*) key,key_length);
- DBUG_DUMP("new_in_page",(char*) old_keypos,(uint) (keypos-old_keypos));
+ DBUG_DUMP("new_in_page",(uchar*) old_keypos,(uint) (keypos-old_keypos));
goto err;
}
param->record_checksum+=(ha_checksum) record;
@@ -1545,6 +1545,8 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info,
if (info->s->options & (HA_OPTION_CHECKSUM | HA_OPTION_COMPRESS_RECORD))
param->testflag|=T_CALC_CHECKSUM;
+ DBUG_ASSERT(param->use_buffers < SIZE_T_MAX);
+
if (!param->using_global_keycache)
VOID(init_key_cache(dflt_key_cache, param->key_cache_block_size,
(size_t) param->use_buffers, 0, 0));
diff --git a/storage/myisam/mi_search.c b/storage/myisam/mi_search.c
index b6233d4a092..95f817e47aa 100644
--- a/storage/myisam/mi_search.c
+++ b/storage/myisam/mi_search.c
@@ -302,7 +302,8 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
uchar *end, *kseg, *vseg;
uchar *sort_order=keyinfo->seg->charset->sort_order;
uchar tt_buff[MI_MAX_KEY_BUFF+2], *t_buff=tt_buff+2;
- uchar *saved_from, *saved_to, *saved_vseg;
+ uchar *UNINIT_VAR(saved_from), *UNINIT_VAR(saved_to);
+ uchar *UNINIT_VAR(saved_vseg);
uint saved_length=0, saved_prefix_len=0;
uint length_pack;
DBUG_ENTER("_mi_prefix_search");
@@ -310,9 +311,6 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
LINT_INIT(length);
LINT_INIT(prefix_len);
LINT_INIT(seg_len_pack);
- LINT_INIT(saved_from);
- LINT_INIT(saved_to);
- LINT_INIT(saved_vseg);
t_buff[0]=0; /* Avoid bugs */
end= page+mi_getint(page);
diff --git a/storage/myisam/mi_write.c b/storage/myisam/mi_write.c
index 91cc146e706..624c31e57ff 100644
--- a/storage/myisam/mi_write.c
+++ b/storage/myisam/mi_write.c
@@ -712,8 +712,8 @@ static uchar *_mi_find_last_pos(MI_KEYDEF *keyinfo, uchar *page,
uchar *key, uint *return_key_length,
uchar **after_key)
{
- uint keys,length,last_length,key_ref_length;
- uchar *end,*lastpos,*prevpos;
+ uint keys,length,UNINIT_VAR(last_length),key_ref_length;
+ uchar *end,*lastpos,*UNINIT_VAR(prevpos);
uchar key_buff[MI_MAX_KEY_BUFF];
DBUG_ENTER("_mi_find_last_pos");
@@ -732,8 +732,6 @@ static uchar *_mi_find_last_pos(MI_KEYDEF *keyinfo, uchar *page,
DBUG_RETURN(end);
}
- LINT_INIT(prevpos);
- LINT_INIT(last_length);
end=page+length-key_ref_length;
*key='\0';
length=0;
diff --git a/storage/myisam/myisamchk.c b/storage/myisam/myisamchk.c
index 270bcf7f6ce..611fb6325c8 100644
--- a/storage/myisam/myisamchk.c
+++ b/storage/myisam/myisamchk.c
@@ -837,7 +837,7 @@ static int myisamchk(MI_CHECK *param, char * filename)
mi_check_print_error(param,"'%s' is marked as crashed after last repair",filename);
break;
case HA_ERR_OLD_FILE:
- mi_check_print_error(param,"'%s' is a old type of MyISAM-table", filename);
+ mi_check_print_error(param,"'%s' is an old type of MyISAM-table", filename);
break;
case HA_ERR_END_OF_FILE:
mi_check_print_error(param,"Couldn't read complete header from '%s'", filename);