Commit a60b8496 authored by unknown's avatar unknown

Fixed some DBUG_PRINT format problems.

parent e637fe92
......@@ -63,8 +63,8 @@ int _mi_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
uchar *keypos,*maxpos;
uchar lastkey[MI_MAX_KEY_BUFF],*buff;
DBUG_ENTER("_mi_search");
DBUG_PRINT("enter",("pos: %ld nextflag: %d lastpos: %ld",
pos,nextflag,info->lastpos));
DBUG_PRINT("enter",("pos: %lu nextflag: %u lastpos: %lu",
(ulong) pos, nextflag, (ulong) info->lastpos));
DBUG_EXECUTE("key",_mi_print_key(DBUG_FILE,keyinfo->seg,key,key_len););
if (pos == HA_OFFSET_ERROR)
......@@ -235,15 +235,15 @@ int _mi_seq_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
if (length == 0 || page > end)
{
my_errno=HA_ERR_CRASHED;
DBUG_PRINT("error",("Found wrong key: length: %d page: %lx end: %lx",
length,page,end));
DBUG_PRINT("error",("Found wrong key: length: %u page: %p end: %p",
length, page, end));
DBUG_RETURN(MI_FOUND_WRONG_KEY);
}
if ((flag=_mi_key_cmp(keyinfo->seg,t_buff,key,key_len,comp_flag,
&not_used)) >= 0)
break;
#ifdef EXTRA_DEBUG
DBUG_PRINT("loop",("page: %lx key: '%s' flag: %d",page,t_buff,flag));
DBUG_PRINT("loop",("page: %p key: '%s' flag: %d", page, t_buff, flag));
#endif
memcpy(buff,t_buff,length);
*ret_pos=page;
......@@ -251,7 +251,7 @@ int _mi_seq_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
if (flag == 0)
memcpy(buff,t_buff,length); /* Result is first key */
*last_key= page == end;
DBUG_PRINT("exit",("flag: %d ret_pos: %lx",flag,*ret_pos));
DBUG_PRINT("exit",("flag: %d ret_pos: %p", flag, *ret_pos));
DBUG_RETURN(flag);
} /* _mi_seq_search */
......@@ -350,7 +350,8 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
saved_vseg=vseg;
saved_prefix_len=prefix_len;
DBUG_PRINT("loop",("page: '%.*s%.*s'",prefix_len,t_buff+seg_len_pack,suffix_len,vseg));
DBUG_PRINT("loop",("page: '%.*s%.*s'", prefix_len, t_buff + seg_len_pack,
suffix_len, vseg));
{
uchar *from=vseg+suffix_len;
MI_KEYSEG *keyseg;
......@@ -381,8 +382,8 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
if (page > end)
{
my_errno=HA_ERR_CRASHED;
DBUG_PRINT("error",("Found wrong key: length: %d page: %lx end: %lx",
length,page,end));
DBUG_PRINT("error",("Found wrong key: length: %u page: %p end: %p",
length, page, end));
DBUG_RETURN(MI_FOUND_WRONG_KEY);
}
......@@ -463,7 +464,7 @@ int _mi_prefix_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page,
*last_key= page == end;
DBUG_PRINT("exit",("flag: %d ret_pos: %lx",flag,*ret_pos));
DBUG_PRINT("exit",("flag: %d ret_pos: %p", flag, *ret_pos));
DBUG_RETURN(flag);
} /* _mi_prefix_search */
......@@ -1134,7 +1135,8 @@ uint _mi_get_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag,
key+= length; /* Same diff_key as prev */
if (length > keyseg->length)
{
DBUG_PRINT("error",("Found too long null packed key: %d of %d at %lx",
DBUG_PRINT("error",
("Found too long null packed key: %u of %u at %p",
length, keyseg->length, *page_pos));
DBUG_DUMP("key",(char*) *page_pos,16);
my_errno=HA_ERR_CRASHED;
......@@ -1190,7 +1192,7 @@ uint _mi_get_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag,
}
if (length > (uint) keyseg->length)
{
DBUG_PRINT("error",("Found too long packed key: %d of %d at %lx",
DBUG_PRINT("error",("Found too long packed key: %u of %u at %p",
length, keyseg->length, *page_pos));
DBUG_DUMP("key",(char*) *page_pos,16);
my_errno=HA_ERR_CRASHED;
......@@ -1245,7 +1247,7 @@ uint _mi_get_binary_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag,
{
if (length > keyinfo->maxlength)
{
DBUG_PRINT("error",("Found too long binary packed key: %d of %d at %lx",
DBUG_PRINT("error",("Found too long binary packed key: %u of %u at %p",
length, keyinfo->maxlength, *page_pos));
DBUG_DUMP("key",(char*) *page_pos,16);
my_errno=HA_ERR_CRASHED;
......@@ -1292,7 +1294,7 @@ uint _mi_get_binary_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag,
length-=tmp;
from=page; from_end=page_end;
}
DBUG_PRINT("info",("key: %lx from: %lx length: %u",
DBUG_PRINT("info",("key: %p from: %p length: %u",
key, from, length));
memcpy_overlap((byte*) key, (byte*) from, (size_t) length);
key+=length;
......@@ -1348,7 +1350,7 @@ uchar *_mi_get_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page,
}
}
}
DBUG_PRINT("exit",("page: %lx length: %d",page,*return_key_length));
DBUG_PRINT("exit",("page: %p length: %u", page, *return_key_length));
DBUG_RETURN(page);
} /* _mi_get_key */
......@@ -1399,7 +1401,7 @@ uchar *_mi_get_last_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page,
uint nod_flag;
uchar *lastpos;
DBUG_ENTER("_mi_get_last_key");
DBUG_PRINT("enter",("page: %lx endpos: %lx",page,endpos));
DBUG_PRINT("enter",("page: %p endpos: %p", page, endpos));
nod_flag=mi_test_if_nod(page);
if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)))
......@@ -1419,13 +1421,13 @@ uchar *_mi_get_last_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page,
*return_key_length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,lastkey);
if (*return_key_length == 0)
{
DBUG_PRINT("error",("Couldn't find last key: page: %lx",page));
DBUG_PRINT("error",("Couldn't find last key: page: %p", page));
my_errno=HA_ERR_CRASHED;
DBUG_RETURN(0);
}
}
}
DBUG_PRINT("exit",("lastpos: %lx length: %d",lastpos,*return_key_length));
DBUG_PRINT("exit",("lastpos: %p length: %u", lastpos, *return_key_length));
DBUG_RETURN(lastpos);
} /* _mi_get_last_key */
......@@ -1510,8 +1512,9 @@ int _mi_search_next(register MI_INFO *info, register MI_KEYDEF *keyinfo,
uint nod_flag;
uchar lastkey[MI_MAX_KEY_BUFF];
DBUG_ENTER("_mi_search_next");
DBUG_PRINT("enter",("nextflag: %d lastpos: %ld int_keypos: %lx",
nextflag,(long) info->lastpos,info->int_keypos));
DBUG_PRINT("enter",("nextflag: %u lastpos: %lu int_keypos: %lu",
nextflag, (ulong) info->lastpos,
(ulong) info->int_keypos));
DBUG_EXECUTE("key",_mi_print_key(DBUG_FILE,keyinfo->seg,key,key_length););
/* Force full read if we are at last key or if we are not on a leaf
......@@ -1618,7 +1621,7 @@ int _mi_search_first(register MI_INFO *info, register MI_KEYDEF *keyinfo,
info->page_changed=info->buff_used=0;
info->lastpos=_mi_dpos(info,0,info->lastkey+info->lastkey_length);
DBUG_PRINT("exit",("found key at %ld",(ulong) info->lastpos));
DBUG_PRINT("exit",("found key at %lu", (ulong) info->lastpos));
DBUG_RETURN(0);
} /* _mi_search_first */
......@@ -1852,8 +1855,8 @@ _mi_calc_var_pack_key_length(MI_KEYDEF *keyinfo,uint nod_flag,uchar *next_key,
}
s_temp->totlength=(uint) length;
s_temp->prev_length=0;
DBUG_PRINT("test",("tot_length: %d length: %d uniq_key_length: %d",
key_length,length,s_temp->key_length));
DBUG_PRINT("test",("tot_length: %u length: %d uniq_key_length: %u",
key_length, length, s_temp->key_length));
/* If something after that hasn't length=0, test if we can combine */
if ((s_temp->next_key_pos=next_key))
......@@ -1959,7 +1962,7 @@ _mi_calc_var_pack_key_length(MI_KEYDEF *keyinfo,uint nod_flag,uchar *next_key,
ref_length=0;
next_length_pack=0;
}
DBUG_PRINT("test",("length: %d next_key: %lx",length,next_key));
DBUG_PRINT("test",("length: %d next_key: %p", length, next_key));
{
uint tmp_length;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment