Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-4.1

into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-4.1-main


sql-common/my_time.c:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/table.cc:
  Auto merged
This commit is contained in:
unknown 2007-04-10 16:37:20 +03:00
commit c46dd446e8
91 changed files with 356 additions and 256 deletions

View file

@ -440,7 +440,7 @@ int main(int argc,char *argv[])
put_info((char*) glob_buffer.ptr(),INFO_INFO);
#ifdef HAVE_READLINE
initialize_readline(my_progname);
initialize_readline((char*) my_progname);
if (!status.batch && !quick && !opt_html && !opt_xml)
{
/* read-history from file, default ~/.mysql_history*/

View file

@ -834,7 +834,7 @@ static int dump_remote_log_entries(const char* logname)
}
if (len < 8 && net->read_pos[0] == 254)
break; // end of data
DBUG_PRINT("info",( "len= %u, net->read_pos[5] = %d\n",
DBUG_PRINT("info",( "len: %lu net->read_pos[5]: %d\n",
len, net->read_pos[5]));
Log_event *ev = Log_event::read_log_event((const char*) net->read_pos + 1 ,
len - 1, &error_msg, old_format);

View file

@ -103,7 +103,7 @@ bool String::set(longlong num, CHARSET_INFO *cs)
}
else
{
str_length=cs->cset->snprintf(cs,Ptr,l,"%d",num);
str_length=cs->cset->snprintf(cs,Ptr,l,"%ld", (long) num);
}
str_charset=cs;
return FALSE;
@ -121,7 +121,7 @@ bool String::set(ulonglong num, CHARSET_INFO *cs)
}
else
{
str_length=cs->cset->snprintf(cs,Ptr,l,"%d",num);
str_length=cs->cset->snprintf(cs,Ptr,l,"%ld", (long) num);
}
str_charset=cs;
return FALSE;

View file

@ -253,7 +253,9 @@ int main(int argc,char *argv[])
'Unknown Error' (without regard to case).
*/
if (msg &&
my_strnncoll(&my_charset_latin1, msg, 13, "Unknown Error", 13) &&
my_strnncoll(&my_charset_latin1,
(const uchar *) msg, 13,
(const uchar *) "Unknown Error", 13) &&
(!unknown_error || strcmp(msg, unknown_error)))
{
found=1;

View file

@ -87,7 +87,7 @@ int heap_check_heap(HP_INFO *info, my_bool print_status)
if (records != share->records || deleted != share->deleted)
{
DBUG_PRINT("error",("Found rows: %lu (%lu) deleted %lu (%lu)",
DBUG_PRINT("error",("Found rows: %lu (%u) deleted %lu (%u)",
records, share->records, deleted, share->deleted));
error= 1;
}
@ -123,7 +123,7 @@ static int check_one_key(HP_KEYDEF *keydef, uint keynr, ulong records,
blength, records))
!= i)
{
DBUG_PRINT("error",("Record in wrong link: Link %d Record: %lx Record-link %d", i,hash_info->ptr_to_rec,rec_link));
DBUG_PRINT("error",("Record in wrong link: Link %d Record: %lx Record-link %d", i, (ulong) hash_info->ptr_to_rec, rec_link));
error=1;
}
else
@ -135,12 +135,12 @@ static int check_one_key(HP_KEYDEF *keydef, uint keynr, ulong records,
}
if (found != records)
{
DBUG_PRINT("error",("Found %ld of %ld records", found, records));
DBUG_PRINT("error",("Found %u of %ld records", found, records));
error=1;
}
if (keydef->hash_buckets != hash_buckets_found)
{
DBUG_PRINT("error",("Found %ld buckets, stats shows %ld buckets",
DBUG_PRINT("error",("Found %u buckets, stats shows %ld buckets",
hash_buckets_found, keydef->hash_buckets));
error=1;
}
@ -181,7 +181,7 @@ static int check_one_rb_key(HP_INFO *info, uint keynr, ulong records,
{
error= 1;
DBUG_PRINT("error",("Record in wrong link: key: %d Record: %lx\n",
keynr, recpos));
keynr, (ulong) recpos));
}
else
found++;

View file

@ -24,7 +24,7 @@ int heap_delete(HP_INFO *info, const byte *record)
HP_SHARE *share=info->s;
HP_KEYDEF *keydef, *end, *p_lastinx;
DBUG_ENTER("heap_delete");
DBUG_PRINT("enter",("info: %lx record: %lx",info,record));
DBUG_PRINT("enter",("info: %lx record: %lx", (ulong) info, (ulong) record));
test_active(info);
@ -143,7 +143,7 @@ int hp_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
info->current_hash_ptr=last_ptr;
info->current_ptr = last_ptr ? last_ptr->ptr_to_rec : 0;
DBUG_PRINT("info",("Corrected current_ptr to point at: %lx",
info->current_ptr));
(ulong) info->current_ptr));
}
empty=pos;
if (gpos)

View file

@ -120,7 +120,7 @@ byte *hp_search(HP_INFO *info, HP_KEYDEF *keyinfo, const byte *key,
{
switch (nextflag) {
case 0: /* Search after key */
DBUG_PRINT("exit",("found key at %d",pos->ptr_to_rec));
DBUG_PRINT("exit",("found key at %lu", (ulong) pos->ptr_to_rec));
info->current_hash_ptr=pos;
DBUG_RETURN(info->current_ptr= pos->ptr_to_rec);
case 1: /* Search next */

View file

@ -63,8 +63,9 @@ HP_INFO *heap_open(const char *name, int mode)
#ifndef DBUG_OFF
info->opt_flag= READ_CHECK_USED; /* Check when changing */
#endif
DBUG_PRINT("exit",("heap: %lx reclength: %d records_in_block: %d",
info,share->reclength,share->block.records_in_block));
DBUG_PRINT("exit",("heap: 0x%lx reclength: %d records_in_block: %d",
(ulong) info, share->reclength,
share->block.records_in_block));
DBUG_RETURN(info);
}
@ -82,7 +83,7 @@ HP_SHARE *hp_find_named_heap(const char *name)
info= (HP_SHARE*) pos->data;
if (!strcmp(name, info->name))
{
DBUG_PRINT("exit", ("Old heap_database: %lx",info));
DBUG_PRINT("exit", ("Old heap_database: 0x%lx", (ulong) info));
DBUG_RETURN(info);
}
}

View file

@ -23,7 +23,7 @@ int heap_rkey(HP_INFO *info, byte *record, int inx, const byte *key,
HP_SHARE *share= info->s;
HP_KEYDEF *keyinfo= share->keydef + inx;
DBUG_ENTER("heap_rkey");
DBUG_PRINT("enter",("base: %lx inx: %d",info,inx));
DBUG_PRINT("enter",("base: 0x%lx inx: %d", (ulong) info, inx));
if ((uint) inx >= share->keys)
{

View file

@ -29,7 +29,7 @@ int heap_rrnd(register HP_INFO *info, byte *record, byte *pos)
{
HP_SHARE *share=info->s;
DBUG_ENTER("heap_rrnd");
DBUG_PRINT("enter",("info: %lx pos: %lx",info,pos));
DBUG_PRINT("enter",("info: 0x%lx pos: 0x%lx", (ulong) info, (ulong) pos));
info->lastinx= -1;
if (!(info->current_ptr= pos))
@ -44,7 +44,7 @@ int heap_rrnd(register HP_INFO *info, byte *record, byte *pos)
}
info->update=HA_STATE_PREV_FOUND | HA_STATE_NEXT_FOUND | HA_STATE_AKTIV;
memcpy(record,info->current_ptr,(size_t) share->reclength);
DBUG_PRINT("exit",("found record at %lx",info->current_ptr));
DBUG_PRINT("exit",("found record at 0x%lx", (ulong) info->current_ptr));
info->current_hash_ptr=0; /* Can't use rnext */
DBUG_RETURN(0);
} /* heap_rrnd */
@ -64,7 +64,7 @@ int heap_rrnd_old(register HP_INFO *info, byte *record, ulong pos)
{
HP_SHARE *share=info->s;
DBUG_ENTER("heap_rrnd");
DBUG_PRINT("enter",("info: %lx pos: %ld",info,pos));
DBUG_PRINT("enter",("info: 0x%lx pos: %ld",info,pos));
info->lastinx= -1;
if (pos == (ulong) -1)
@ -98,7 +98,7 @@ end:
}
info->update=HA_STATE_PREV_FOUND | HA_STATE_NEXT_FOUND | HA_STATE_AKTIV;
memcpy(record,info->current_ptr,(size_t) share->reclength);
DBUG_PRINT("exit",("found record at %lx",info->current_ptr));
DBUG_PRINT("exit",("found record at 0x%lx",info->current_ptr));
info->current_hash_ptr=0; /* Can't use rnext */
DBUG_RETURN(0);
} /* heap_rrnd */

View file

@ -143,7 +143,7 @@ static byte *next_free_record_pos(HP_SHARE *info)
pos=info->del_link;
info->del_link= *((byte**) pos);
info->deleted--;
DBUG_PRINT("exit",("Used old position: %lx",pos));
DBUG_PRINT("exit",("Used old position: 0x%lx", (ulong) pos));
DBUG_RETURN(pos);
}
if (!(block_pos=(info->records % info->block.records_in_block)))
@ -158,8 +158,8 @@ static byte *next_free_record_pos(HP_SHARE *info)
DBUG_RETURN(NULL);
info->data_length+=length;
}
DBUG_PRINT("exit",("Used new position: %lx",
(byte*) info->block.level_info[0].last_blocks+block_pos*
DBUG_PRINT("exit",("Used new position: 0x%lx",
(ulong) info->block.level_info[0].last_blocks+block_pos*
info->block.recbuffer));
DBUG_RETURN((byte*) info->block.level_info[0].last_blocks+
block_pos*info->block.recbuffer);

View file

@ -203,7 +203,7 @@ extern int errno; /* declare errno */
extern const char ** NEAR my_errmsg[];
extern char NEAR errbuff[NRERRBUFFS][ERRMSGSIZE];
extern char *home_dir; /* Home directory for user */
extern char *my_progname; /* program-name (printed in errors) */
extern const char *my_progname; /* program-name (printed in errors) */
extern char NEAR curr_dir[]; /* Current directory for user */
extern int (*error_handler_hook)(uint my_err, const char *str,myf MyFlags);
extern int (*fatal_error_handler_hook)(uint my_err, const char *str,

View file

@ -141,7 +141,7 @@ class RaidFd {
inline void Calculate()
{
DBUG_ENTER("RaidFd::_Calculate");
DBUG_PRINT("info",("_position: %lu _raid_chunksize: %d, _size: %lu",
DBUG_PRINT("info",("_position: %lu _raid_chunksize: %lu _size: %lu",
(ulong) _position, _raid_chunksize, (ulong) _size));
_total_block = (ulong) (_position / _raid_chunksize);
@ -149,7 +149,7 @@ class RaidFd {
_remaining_bytes = (uint) (_raid_chunksize -
(_position - _total_block * _raid_chunksize));
DBUG_PRINT("info",
("_total_block: %d this_block: %d _remaining_bytes:%d",
("_total_block: %lu this_block: %d _remaining_bytes: %d",
_total_block, _this_block, _remaining_bytes));
DBUG_VOID_RETURN;
}

View file

@ -713,8 +713,8 @@ uint _nisam_rec_unpack(register N_INFO *info, register byte *to, byte *from,
DBUG_RETURN((info->packed_length=found_length));
err:
my_errno=HA_ERR_RECORD_DELETED;
DBUG_PRINT("error",("to_end: %lx -> %lx from_end: %lx -> %lx",
to,to_end,from,from_end));
DBUG_PRINT("error",("to_end: 0x%lx -> 0x%lx from_end: 0x%lx -> 0x%lx",
(long) to, (long) to_end, (long) from, (long) from_end));
DBUG_DUMP("from",(byte*) info->rec_buff,info->s->base.min_pack_length);
DBUG_RETURN(MY_FILE_ERROR);
} /* _nisam_rec_unpack */

View file

@ -70,7 +70,7 @@ int _nisam_write_keypage(register N_INFO *info, register N_KEYDEF *keyinfo,
my_errno=EINVAL;
return(-1);
}
DBUG_PRINT("page",("write page at: %lu",(long) page,buff));
DBUG_PRINT("page",("write page at: %lu", (long) page));
DBUG_DUMP("buff",(byte*) buff,getint(buff));
#endif
@ -138,6 +138,6 @@ ulong _nisam_new(register N_INFO *info, N_KEYDEF *keyinfo)
(uint) keyinfo->base.block_length,0))
pos= NI_POS_ERROR;
}
DBUG_PRINT("exit",("Pos: %d",pos));
DBUG_PRINT("exit",("Pos: %lu", pos));
DBUG_RETURN(pos);
} /* _nisam_new */

View file

@ -208,14 +208,15 @@ int _nisam_seq_search(N_INFO *info, register N_KEYDEF *keyinfo, uchar *page, uch
if ((flag=_nisam_key_cmp(keyinfo->seg,t_buff,key,key_len,comp_flag)) >= 0)
break;
#ifdef EXTRA_DEBUG
DBUG_PRINT("loop",("page: %lx key: '%s' flag: %d",page,t_buff,flag));
DBUG_PRINT("loop",("page: 0x%lx key: '%s' flag: %d",
(long) page, t_buff, flag));
#endif
memcpy(buff,t_buff,length);
*ret_pos=page;
}
if (flag == 0)
memcpy(buff,t_buff,length); /* Result is first key */
DBUG_PRINT("exit",("flag: %d ret_pos: %lx",flag,*ret_pos));
DBUG_PRINT("exit",("flag: %d ret_pos: 0x%lx", flag, (long) *ret_pos));
DBUG_RETURN(flag);
} /* _nisam_seq_search */
@ -754,8 +755,8 @@ int _nisam_search_next(register N_INFO *info, register N_KEYDEF *keyinfo,
uint nod_flag;
uchar lastkey[N_MAX_KEY_BUFF];
DBUG_ENTER("_nisam_search_next");
DBUG_PRINT("enter",("nextflag: %d lastpos: %d int_keypos: %lx",
nextflag,info->lastpos,info->int_keypos));
DBUG_PRINT("enter",("nextflag: %u lastpos: %lu int_keypos: 0x%lx",
nextflag, info->lastpos, (long) info->int_keypos));
DBUG_EXECUTE("key",_nisam_print_key(DBUG_FILE,keyinfo->seg,key););
if ((nextflag & SEARCH_BIGGER && info->int_keypos >= info->int_maxpos) ||
@ -807,7 +808,7 @@ int _nisam_search_next(register N_INFO *info, register N_KEYDEF *keyinfo,
VOID(_nisam_move_key(keyinfo,info->lastkey,lastkey));
VOID((*keyinfo->get_key)(keyinfo,nod_flag,&info->int_keypos,info->lastkey));
info->lastpos=_nisam_dpos(info,nod_flag,info->int_keypos);
DBUG_PRINT("exit",("found key at %d",info->lastpos));
DBUG_PRINT("exit",("found key at %lu", info->lastpos));
DBUG_RETURN(0);
} /* _nisam_search_next */
@ -845,7 +846,7 @@ int _nisam_search_first(register N_INFO *info, register N_KEYDEF *keyinfo, regis
info->page_changed=info->buff_used=0;
info->last_search_keypage=info->int_pos;
DBUG_PRINT("exit",("found key at %d",info->lastpos));
DBUG_PRINT("exit",("found key at %lu", info->lastpos));
DBUG_RETURN(0);
} /* _nisam_search_first */
@ -884,6 +885,6 @@ int _nisam_search_last(register N_INFO *info, register N_KEYDEF *keyinfo, regist
info->page_changed=info->buff_used=0;
info->last_search_keypage=info->int_pos;
DBUG_PRINT("exit",("found key at %d",info->lastpos));
DBUG_PRINT("exit",("found key at %lu", info->lastpos));
DBUG_RETURN(0);
} /* _nisam_search_last */

View file

@ -23,9 +23,9 @@ int nisam_close(register N_INFO *info)
int error=0,flag;
ISAM_SHARE *share=info->s;
DBUG_ENTER("nisam_close");
DBUG_PRINT("enter",("base: %lx reopen: %u locks: %u",
info,(uint) share->reopen,
(uint) (share->w_locks+share->r_locks)));
DBUG_PRINT("enter",("base: 0x%lx reopen: %u locks: %u",
(long) info, (uint) share->reopen,
(uint) (share->w_locks + share->r_locks)));
pthread_mutex_lock(&THR_LOCK_isam);
if (info->lock_type == F_EXTRA_LCK)

View file

@ -258,7 +258,8 @@ static int del(register N_INFO *info, register N_KEYDEF *keyinfo, uchar *key,
ISAM_SHARE *share=info->s;
S_PARAM s_temp;
DBUG_ENTER("del");
DBUG_PRINT("enter",("leaf_page: %ld keypos: %lx",leaf_page,keypos));
DBUG_PRINT("enter",("leaf_page: %ld keypos: 0x%lx",
(long) leaf_page, (long) keypos));
DBUG_DUMP("leaf_buff",(byte*) leaf_buff,getint(leaf_buff));
endpos=leaf_buff+getint(leaf_buff);
@ -349,7 +350,8 @@ static int underflow(register N_INFO *info, register N_KEYDEF *keyinfo,
S_PARAM s_temp;
ISAM_SHARE *share=info->s;
DBUG_ENTER("underflow");
DBUG_PRINT("enter",("leaf_page: %ld keypos: %lx",leaf_page,keypos));
DBUG_PRINT("enter",("leaf_page: %ld keypos: 0x%lx",
leaf_page, (long) keypos));
DBUG_DUMP("anc_buff",(byte*) anc_buff,getint(anc_buff));
DBUG_DUMP("leaf_buff",(byte*) leaf_buff,getint(leaf_buff));
@ -558,7 +560,8 @@ static uint remove_key(N_KEYDEF *keyinfo, uint nod_flag,
int r_length,s_length,first,diff_flag;
uchar *start;
DBUG_ENTER("remove_key");
DBUG_PRINT("enter",("keypos: %lx page_end: %lx",keypos,page_end));
DBUG_PRINT("enter",("keypos: 0x%lx page_end: 0x%lx",
(long) keypos, (long) page_end));
start=keypos;
if (!(keyinfo->base.flag & (HA_PACK_KEY | HA_SPACE_PACK_USED)))

View file

@ -116,7 +116,7 @@ N_INFO *nisam_open(const char *name, int mode, uint handle_locking)
HA_OPTION_TEMP_COMPRESS_RECORD))
{
DBUG_PRINT("error",("wrong options: 0x%lx",
uint2korr(share->state.header.options)));
(long) uint2korr(share->state.header.options)));
my_errno=HA_ERR_OLD_FILE;
goto err;
}

View file

@ -27,8 +27,8 @@ int nisam_rkey(N_INFO *info, byte *buf, int inx, const byte *key, uint key_len,
uchar *key_buff;
ISAM_SHARE *share=info->s;
DBUG_ENTER("nisam_rkey");
DBUG_PRINT("enter",("base: %lx inx: %d search_flag: %d",
info,inx,search_flag));
DBUG_PRINT("enter",("base: 0x%lx inx: %d search_flag: %d",
(long) info, inx, search_flag));
if ((inx = _nisam_check_index(info,inx)) < 0)
DBUG_RETURN(-1);

View file

@ -542,7 +542,7 @@ my_string name;
#if O_TEMPORARY == 0 && !defined(CANT_DELETE_OPEN_FILES)
VOID(my_delete(name,MYF(MY_WME | ME_NOINPUT)));
#endif
DBUG_PRINT("exit",("stream: %lx",stream));
DBUG_PRINT("exit",("stream: 0x%lx", (long) stream));
DBUG_RETURN (stream);
} /* opentemp */

View file

@ -226,7 +226,7 @@ int _nisam_insert(register N_INFO *info, register N_KEYDEF *keyinfo,
int key_offset;
S_PARAM s_temp;
DBUG_ENTER("_nisam_insert");
DBUG_PRINT("enter",("key_pos: %lx",key_pos));
DBUG_PRINT("enter",("key_pos: 0x%lx", (long) key_pos));
DBUG_EXECUTE("key",_nisam_print_key(DBUG_FILE,keyinfo->seg,key););
nod_flag=test_if_nod(anc_buff);
@ -243,8 +243,9 @@ int _nisam_insert(register N_INFO *info, register N_KEYDEF *keyinfo,
{
DBUG_PRINT("test",("t_length: %d ref_len: %d",
t_length,s_temp.ref_length));
DBUG_PRINT("test",("n_ref_len: %d n_length: %d key: %lx",
s_temp.n_ref_length,s_temp.n_length,s_temp.key));
DBUG_PRINT("test",("n_ref_len: %d n_length: %d key: 0x%lx",
s_temp.n_ref_length, s_temp.n_length,
(long) s_temp.key));
}
#endif
key_offset = (uint)(endpos-key_pos);
@ -430,7 +431,7 @@ uint _nisam_get_pack_key_length(N_KEYDEF *keyinfo, uint nod_flag, uchar *key_pos
if (*start == *key_pos && diff_flag && start != key_end)
length++; /* One new pos for ref.len */
DBUG_PRINT("test",("length: %d key_pos: %lx",length,key_pos));
DBUG_PRINT("test",("length: %d key_pos: 0x%lx",length,key_pos));
if (n_length != 128)
{ /* Not same key after */
key=start+ref_length;
@ -597,7 +598,7 @@ _nisam_get_pack_key_length(N_KEYDEF *keyinfo,
if (*start == *key_pos && diff_flag && start != key_end)
length++; /* One new pos for ref.len */
}
DBUG_PRINT("test",("length: %d key_pos: %lx",length,key_pos));
DBUG_PRINT("test",("length: %d key_pos: 0x%lx", length, (long) key_pos));
key=start+ref_length;
while (n_length > 0 && key < key_end && *key == *key_pos)
@ -696,7 +697,8 @@ uchar *_nisam_find_half_pos(N_INFO *info, N_KEYDEF *keyinfo, uchar *page, uchar
VOID((*keyinfo->get_key)(keyinfo,nod_flag,&page,key));
} while (page < end);
DBUG_PRINT("exit",("returns: %lx page: %lx half: %lx",lastpos,page,end));
DBUG_PRINT("exit",("returns: 0x%lx page: 0x%lx half: 0x%lx",
(long) lastpos, (long) page, (long) end));
DBUG_RETURN(lastpos);
} /* _nisam_find_half_pos */

View file

@ -2124,7 +2124,7 @@ mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length)
}
stmt->bind= stmt->params + stmt->param_count;
stmt->state= MYSQL_STMT_PREPARE_DONE;
DBUG_PRINT("info", ("Parameter count: %ld", stmt->param_count));
DBUG_PRINT("info", ("Parameter count: %u", stmt->param_count));
DBUG_RETURN(0);
}
@ -2461,9 +2461,10 @@ static my_bool store_param(MYSQL_STMT *stmt, MYSQL_BIND *param)
{
NET *net= &stmt->mysql->net;
DBUG_ENTER("store_param");
DBUG_PRINT("enter",("type: %d, buffer:%lx, length: %lu is_null: %d",
DBUG_PRINT("enter",("type: %d buffer: 0x%lx length: %lu is_null: %d",
param->buffer_type,
param->buffer ? param->buffer : "0", *param->length,
(long) (param->buffer ? param->buffer : NullS),
*param->length,
*param->is_null));
if (*param->is_null)
@ -2499,7 +2500,7 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length)
my_bool res;
DBUG_ENTER("execute");
DBUG_PRINT("enter",("packet: %s, length :%d",packet ? packet :" ", length));
DBUG_PRINT("enter",("packet: %s, length :%lu", packet ? packet : " ", length));
mysql->last_used_con= mysql;
int4store(buff, stmt->stmt_id); /* Send stmt id to server */
@ -3239,8 +3240,8 @@ mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number,
MYSQL_BIND *param;
DBUG_ENTER("mysql_stmt_send_long_data");
DBUG_ASSERT(stmt != 0);
DBUG_PRINT("enter",("param no : %d, data : %lx, length : %ld",
param_number, data, length));
DBUG_PRINT("enter",("param no: %d data: 0x%lx length: %ld",
param_number, (ulong) data, length));
/*
We only need to check for stmt->param_count, if it's not null
@ -3960,7 +3961,7 @@ my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bind)
ulong bind_count= stmt->field_count;
uint param_count= 0;
DBUG_ENTER("mysql_stmt_bind_result");
DBUG_PRINT("enter",("field_count: %d", bind_count));
DBUG_PRINT("enter",("field_count: %lu", bind_count));
if (!bind_count)
{

View file

@ -191,7 +191,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
}
}
DBUG_PRINT("exit",("Mysql handler: %lx",mysql));
DBUG_PRINT("exit",("Mysql handler: 0x%lx", (ulong) mysql));
DBUG_RETURN(mysql);
error:

View file

@ -28,8 +28,9 @@ int mi_close(register MI_INFO *info)
int error=0,flag;
MYISAM_SHARE *share=info->s;
DBUG_ENTER("mi_close");
DBUG_PRINT("enter",("base: %lx reopen: %u locks: %u",
info,(uint) share->reopen, (uint) share->tot_locks));
DBUG_PRINT("enter",("base: 0x%lx reopen: %u locks: %u",
(long) info, (uint) share->reopen,
(uint) share->tot_locks));
pthread_mutex_lock(&THR_LOCK_myisam);
if (info->lock_type == F_EXTRA_LCK)

View file

@ -152,7 +152,7 @@ static int _mi_ck_real_delete(register MI_INFO *info, MI_KEYDEF *keyinfo,
DBUG_PRINT("error",("Couldn't allocate memory"));
DBUG_RETURN(my_errno=ENOMEM);
}
DBUG_PRINT("info",("root_page: %ld",old_root));
DBUG_PRINT("info",("root_page: %lu", (ulong) old_root));
if (!_mi_fetch_keypage(info,keyinfo,old_root,DFLT_INIT_HITS,root_buff,0))
{
error= -1;
@ -392,7 +392,7 @@ static int del(register MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *key,
MYISAM_SHARE *share=info->s;
MI_KEY_PARAM s_temp;
DBUG_ENTER("del");
DBUG_PRINT("enter",("leaf_page: %ld keypos: 0x%lx", leaf_page,
DBUG_PRINT("enter",("leaf_page: %lu keypos: 0x%lx", (ulong) leaf_page,
(ulong) keypos));
DBUG_DUMP("leaf_buff",(byte*) leaf_buff,mi_getint(leaf_buff));
@ -579,7 +579,8 @@ static int underflow(register MI_INFO *info, register MI_KEYDEF *keyinfo,
else
{ /* Page is full */
endpos=anc_buff+anc_length;
DBUG_PRINT("test",("anc_buff: %lx endpos: %lx",anc_buff,endpos));
DBUG_PRINT("test",("anc_buff: 0x%lx endpos: 0x%lx", (long) anc_buff,
(long) endpos));
if (keypos != anc_buff+2+key_reflength &&
!_mi_get_last_key(info,keyinfo,anc_buff,anc_key,keypos,&length))
goto err;
@ -756,8 +757,8 @@ static uint remove_key(MI_KEYDEF *keyinfo, uint nod_flag,
int s_length;
uchar *start;
DBUG_ENTER("remove_key");
DBUG_PRINT("enter",("keypos: %lx page_end: %lx",keypos,page_end));
DBUG_PRINT("enter",("keypos: 0x%lx page_end: 0x%lx", (long) keypos,
(long) page_end));
start=keypos;
if (!(keyinfo->flag &
(HA_PACK_KEY | HA_SPACE_PACK_USED | HA_VAR_LENGTH_KEY |

View file

@ -1029,8 +1029,9 @@ ulong _mi_rec_unpack(register MI_INFO *info, register byte *to, byte *from,
DBUG_RETURN(found_length);
err:
my_errno=HA_ERR_RECORD_DELETED;
DBUG_PRINT("error",("to_end: %lx -> %lx from_end: %lx -> %lx",
to,to_end,from,from_end));
DBUG_PRINT("error",("to_end: 0x%lx -> 0x%lx from_end: 0x%lx -> 0x%lx",
(ulong) to, (ulong) to_end, (ulong) from,
(ulong) from_end));
DBUG_DUMP("from",(byte*) info->rec_buff,info->s->base.min_pack_length);
DBUG_RETURN(MY_FILE_ERROR);
} /* _mi_rec_unpack */

View file

@ -54,8 +54,9 @@ int mi_assign_to_key_cache(MI_INFO *info,
int error= 0;
MYISAM_SHARE* share= info->s;
DBUG_ENTER("mi_assign_to_key_cache");
DBUG_PRINT("enter",("old_key_cache_handle: %lx new_key_cache_handle: %lx",
share->key_cache, key_cache));
DBUG_PRINT("enter",
("old_key_cache_handle: 0x%lx new_key_cache_handle: 0x%lx",
(long) share->key_cache, (long) key_cache));
/*
Skip operation if we didn't change key cache. This can happen if we

View file

@ -27,7 +27,7 @@ uchar *_mi_fetch_keypage(register MI_INFO *info, MI_KEYDEF *keyinfo,
uchar *tmp;
uint page_size;
DBUG_ENTER("_mi_fetch_keypage");
DBUG_PRINT("enter",("page: %ld",page));
DBUG_PRINT("enter",("page: %ld", (long) page));
tmp=(uchar*) key_cache_read(info->s->key_cache,
info->s->kfile, page, level, (byte*) buff,
@ -78,7 +78,7 @@ int _mi_write_keypage(register MI_INFO *info, register MI_KEYDEF *keyinfo,
my_errno=EINVAL;
DBUG_RETURN((-1));
}
DBUG_PRINT("page",("write page at: %lu",(long) page,buff));
DBUG_PRINT("page",("write page at: %lu",(long) page));
DBUG_DUMP("buff",(byte*) buff,mi_getint(buff));
#endif

View file

@ -254,7 +254,7 @@ int _mi_read_rnd_static_record(MI_INFO *info, byte *buf,
if (filepos >= info->state->data_file_length)
{
DBUG_PRINT("test",("filepos: %ld (%ld) records: %ld del: %ld",
filepos/share->base.reclength,filepos,
(long) filepos/share->base.reclength, (long) filepos,
info->state->records, info->state->del));
fast_mi_writeinfo(info);
DBUG_RETURN(my_errno=HA_ERR_END_OF_FILE);

View file

@ -721,6 +721,7 @@ get_one_option(int optid,
case 2:
method_conv= MI_STATS_METHOD_IGNORE_NULLS;
break;
default: assert(0); /* Impossible */
}
check_param.stats_method= method_conv;
break;

View file

@ -28,7 +28,7 @@ int myrg_extra(MYRG_INFO *info,enum ha_extra_function function,
int error,save_error=0;
MYRG_TABLE *file;
DBUG_ENTER("myrg_extra");
DBUG_PRINT("info",("function: %d",(ulong) function));
DBUG_PRINT("info",("function: %lu",(ulong) function));
if (function == HA_EXTRA_CACHE)
{

View file

@ -491,7 +491,7 @@ static int search_default_file_with_ext(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
ext= fn_ext(search_file->name);
/* check extension */
for (tmp_ext= (char**) f_extensions; *tmp_ext; *tmp_ext++)
for (tmp_ext= (char**) f_extensions; *tmp_ext; tmp_ext++)
{
if (!strcmp(ext, *tmp_ext))
break;

View file

@ -53,7 +53,7 @@ _hash_init(HASH *hash,CHARSET_INFO *charset,
void (*free_element)(void*),uint flags CALLER_INFO_PROTO)
{
DBUG_ENTER("hash_init");
DBUG_PRINT("enter",("hash: 0x%lx size: %d",hash,size));
DBUG_PRINT("enter",("hash: 0x%lx size: %d", (long) hash, size));
hash->records=0;
if (my_init_dynamic_array_ci(&hash->array,sizeof(HASH_LINK),size,0))
@ -109,7 +109,7 @@ static inline void hash_free_elements(HASH *hash)
void hash_free(HASH *hash)
{
DBUG_ENTER("hash_free");
DBUG_PRINT("enter",("hash: 0x%lxd",hash));
DBUG_PRINT("enter",("hash: 0x%lxd", (long) hash));
hash_free_elements(hash);
hash->free= 0;
@ -129,7 +129,7 @@ void hash_free(HASH *hash)
void my_hash_reset(HASH *hash)
{
DBUG_ENTER("my_hash_reset");
DBUG_PRINT("enter",("hash: 0x%lxd",hash));
DBUG_PRINT("enter",("hash: 0x%lxd", (long) hash));
hash_free_elements(hash);
reset_dynamic(&hash->array);
@ -645,7 +645,9 @@ my_bool hash_check(HASH *hash)
if ((rec_link=hash_rec_mask(hash,hash_info,blength,records)) != i)
{
DBUG_PRINT("error",
("Record in wrong link at %d: Start %d Record: 0x%lx Record-link %d", idx,i,hash_info->data,rec_link));
("Record in wrong link at %d: "
"Start %d Record: 0x%lx Record-link %d",
idx, i, (long) hash_info->data, rec_link));
error=1;
}
else
@ -656,13 +658,13 @@ my_bool hash_check(HASH *hash)
}
if (found != records)
{
DBUG_PRINT("error",("Found %ld of %ld records"));
DBUG_PRINT("error",("Found %u of %u records", found, records));
error=1;
}
if (records)
DBUG_PRINT("info",
("records: %ld seeks: %d max links: %d hitrate: %.2f",
records,seek,max_links,(float) seek / (float) records));
("records: %u seeks: %u max links: %d hitrate: %.2f",
records, seek, max_links, (float) seek / (float) records));
return error;
}
#endif

View file

@ -28,7 +28,8 @@
LIST *list_add(LIST *root, LIST *element)
{
DBUG_ENTER("list_add");
DBUG_PRINT("enter",("root: 0x%lx element: %lx", root, element));
DBUG_PRINT("enter",("root: 0x%lx element: 0x%lx", (long) root,
(long) element));
if (root)
{
if (root->prev) /* If add in mid of list */

View file

@ -589,7 +589,9 @@ void init_io_cache_share(IO_CACHE *read_cache, IO_CACHE_SHARE *cshare,
DBUG_ENTER("init_io_cache_share");
DBUG_PRINT("io_cache_share", ("read_cache: 0x%lx share: 0x%lx "
"write_cache: 0x%lx threads: %u",
read_cache, cshare, write_cache, num_threads));
(long) read_cache,
(long) cshare,
(long) write_cache, num_threads));
DBUG_ASSERT(num_threads > 1);
DBUG_ASSERT(read_cache->type == READ_CACHE);
@ -651,7 +653,7 @@ void remove_io_thread(IO_CACHE *cache)
pthread_mutex_lock(&cshare->mutex);
DBUG_PRINT("io_cache_share", ("%s: 0x%lx",
(cache == cshare->source_cache) ?
"writer" : "reader", cache));
"writer" : "reader", (long) cache));
/* Remove from share. */
total= --cshare->total_threads;
@ -727,7 +729,8 @@ static int lock_io_cache(IO_CACHE *cache, my_off_t pos)
cshare->running_threads--;
DBUG_PRINT("io_cache_share", ("%s: 0x%lx pos: %lu running: %u",
(cache == cshare->source_cache) ?
"writer" : "reader", cache, (ulong) pos,
"writer" : "reader",
(long) cache, (ulong) pos,
cshare->running_threads));
if (cshare->source_cache)
@ -866,7 +869,7 @@ static void unlock_io_cache(IO_CACHE *cache)
DBUG_PRINT("io_cache_share", ("%s: 0x%lx pos: %lu running: %u",
(cache == cshare->source_cache) ?
"writer" : "reader",
cache, (ulong) cshare->pos_in_file,
(long) cache, (ulong) cshare->pos_in_file,
cshare->total_threads));
cshare->running_threads= cshare->total_threads;

View file

@ -410,9 +410,9 @@ int init_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
DBUG_PRINT("exit",
("disk_blocks: %d block_root: 0x%lx hash_entries: %d\
hash_root: 0x%lx hash_links: %d hash_link_root: 0x%lx",
keycache->disk_blocks, keycache->block_root,
keycache->hash_entries, keycache->hash_root,
keycache->hash_links, keycache->hash_link_root));
keycache->disk_blocks, (long) keycache->block_root,
keycache->hash_entries, (long) keycache->hash_root,
keycache->hash_links, (long) keycache->hash_link_root));
bzero((gptr) keycache->changed_blocks,
sizeof(keycache->changed_blocks[0]) * CHANGED_BLOCKS_HASH);
bzero((gptr) keycache->file_blocks,
@ -613,7 +613,7 @@ void change_key_cache_param(KEY_CACHE *keycache, uint division_limit,
void end_key_cache(KEY_CACHE *keycache, my_bool cleanup)
{
DBUG_ENTER("end_key_cache");
DBUG_PRINT("enter", ("key_cache: 0x%lx", keycache));
DBUG_PRINT("enter", ("key_cache: 0x%lx", (long) keycache));
if (!keycache->key_cache_inited)
DBUG_VOID_RETURN;
@ -632,7 +632,7 @@ void end_key_cache(KEY_CACHE *keycache, my_bool cleanup)
keycache->blocks_changed= 0;
}
DBUG_PRINT("status", ("used: %d changed: %d w_requests: %lu "
DBUG_PRINT("status", ("used: %lu changed: %lu w_requests: %lu "
"writes: %lu r_requests: %lu reads: %lu",
keycache->blocks_used, keycache->global_blocks_changed,
(ulong) keycache->global_cache_w_requests,
@ -1058,7 +1058,7 @@ static void unreg_request(KEY_CACHE *keycache,
if (block->temperature == BLOCK_WARM)
keycache->warm_blocks--;
block->temperature= BLOCK_HOT;
KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks=%u",
KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %lu",
keycache->warm_blocks));
}
link_block(keycache, block, hot, (my_bool)at_end);
@ -1077,7 +1077,7 @@ static void unreg_request(KEY_CACHE *keycache,
keycache->warm_blocks++;
block->temperature= BLOCK_WARM;
}
KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks=%u",
KEYCACHE_DBUG_PRINT("unreg_request", ("#warm_blocks: %lu",
keycache->warm_blocks));
}
}
@ -1313,11 +1313,11 @@ static BLOCK_LINK *find_key_block(KEY_CACHE *keycache,
DBUG_ENTER("find_key_block");
KEYCACHE_THREAD_TRACE("find_key_block:begin");
DBUG_PRINT("enter", ("fd: %u pos %lu wrmode: %lu",
(uint) file, (ulong) filepos, (uint) wrmode));
KEYCACHE_DBUG_PRINT("find_key_block", ("fd: %u pos: %lu wrmode: %lu",
DBUG_PRINT("enter", ("fd: %u pos: %lu wrmode: %d",
(uint) file, (ulong) filepos, wrmode));
KEYCACHE_DBUG_PRINT("find_key_block", ("fd: %u pos: %lu wrmode: %d",
(uint) file, (ulong) filepos,
(uint) wrmode));
wrmode));
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
DBUG_EXECUTE("check_keycache2",
test_key_cache(keycache, "start of find_key_block", 0););
@ -1587,9 +1587,9 @@ restart:
KEYCACHE_DBUG_ASSERT(page_status != -1);
*page_st=page_status;
KEYCACHE_DBUG_PRINT("find_key_block",
("fd: %u pos %lu block->status %u page_status %lu",
("fd: %u pos: %lu block->status: %u page_status: %d",
(uint) file, (ulong) filepos, block->status,
(uint) page_status));
page_status));
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
DBUG_EXECUTE("check_keycache2",
@ -2274,7 +2274,7 @@ static int flush_key_blocks_int(KEY_CACHE *keycache,
BLOCK_LINK *cache_buff[FLUSH_CACHE],**cache;
int last_errno= 0;
DBUG_ENTER("flush_key_blocks_int");
DBUG_PRINT("enter",("file: %d blocks_used: %d blocks_changed: %d",
DBUG_PRINT("enter",("file: %d blocks_used: %lu blocks_changed: %lu",
file, keycache->blocks_used, keycache->blocks_changed));
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
@ -2474,7 +2474,7 @@ int flush_key_blocks(KEY_CACHE *keycache,
{
int res;
DBUG_ENTER("flush_key_blocks");
DBUG_PRINT("enter", ("keycache: 0x%lx", keycache));
DBUG_PRINT("enter", ("keycache: 0x%lx", (long) keycache));
if (keycache->disk_blocks <= 0)
DBUG_RETURN(0);

View file

@ -159,7 +159,7 @@ static byte *safe_hash_search(SAFE_HASH *hash, const byte *key, uint length)
result= hash->default_value;
else
result= ((SAFE_HASH_ENTRY*) result)->data;
DBUG_PRINT("exit",("data: 0x%lx", result));
DBUG_PRINT("exit",("data: 0x%lx", (long) result));
DBUG_RETURN(result);
}
@ -190,7 +190,7 @@ static my_bool safe_hash_set(SAFE_HASH *hash, const byte *key, uint length,
SAFE_HASH_ENTRY *entry;
my_bool error= 0;
DBUG_ENTER("safe_hash_set");
DBUG_PRINT("enter",("key: %.*s data: 0x%lx", length, key, data));
DBUG_PRINT("enter",("key: %.*s data: 0x%lx", length, key, (long) data));
rw_wrlock(&hash->mutex);
entry= (SAFE_HASH_ENTRY*) hash_search(&hash->hash, key, length);

View file

@ -47,7 +47,7 @@ void init_alloc_root(MEM_ROOT *mem_root, uint block_size,
uint pre_alloc_size __attribute__((unused)))
{
DBUG_ENTER("init_alloc_root");
DBUG_PRINT("enter",("root: 0x%lx", mem_root));
DBUG_PRINT("enter",("root: 0x%lx", (long) mem_root));
mem_root->free= mem_root->used= mem_root->pre_alloc= 0;
mem_root->min_malloc= 32;
mem_root->block_size= block_size - ALLOC_ROOT_MIN_BLOCK_SIZE;
@ -263,7 +263,8 @@ void free_root(MEM_ROOT *root, myf MyFlags)
{
reg1 USED_MEM *next,*old;
DBUG_ENTER("free_root");
DBUG_PRINT("enter",("root: 0x%lx flags: %u", root, (uint) MyFlags));
DBUG_PRINT("enter",("root: 0x%lx flags: %u",
(long) root, (uint) MyFlags));
if (!root) /* QQ: Should be deleted */
DBUG_VOID_RETURN; /* purecov: inspected */

View file

@ -30,7 +30,7 @@ File my_dup(File file, myf MyFlags)
File fd;
const char *filename;
DBUG_ENTER("my_dup");
DBUG_PRINT("my",("file: %d MyFlags: %d", MyFlags));
DBUG_PRINT("my",("file: %d MyFlags: %d", file, MyFlags));
fd = dup(file);
filename= (((uint) file < my_file_limit) ?
my_file_info[(int) file].name : "Unknown");

View file

@ -79,7 +79,7 @@ FILE *my_fopen(const char *filename, int flags, myf MyFlags)
my_stream_opened++;
my_file_info[fileno(fd)].type = STREAM_BY_FOPEN;
pthread_mutex_unlock(&THR_LOCK_open);
DBUG_PRINT("exit",("stream: 0x%lx",fd));
DBUG_PRINT("exit",("stream: 0x%lx", (long) fd));
DBUG_RETURN(fd);
}
pthread_mutex_unlock(&THR_LOCK_open);
@ -103,7 +103,7 @@ int my_fclose(FILE *fd, myf MyFlags)
{
int err,file;
DBUG_ENTER("my_fclose");
DBUG_PRINT("my",("stream: 0x%lx MyFlags: %d",fd, MyFlags));
DBUG_PRINT("my",("stream: 0x%lx MyFlags: %d", (long) fd, MyFlags));
pthread_mutex_lock(&THR_LOCK_open);
file=fileno(fd);
@ -163,7 +163,7 @@ FILE *my_fdopen(File Filedes, const char *name, int Flags, myf MyFlags)
pthread_mutex_unlock(&THR_LOCK_open);
}
DBUG_PRINT("exit",("stream: 0x%lx",fd));
DBUG_PRINT("exit",("stream: 0x%lx", (long) fd));
DBUG_RETURN(fd);
} /* my_fdopen */

View file

@ -40,7 +40,7 @@ uint my_fread(FILE *stream, byte *Buffer, uint Count, myf MyFlags)
uint readbytes;
DBUG_ENTER("my_fread");
DBUG_PRINT("my",("stream: 0x%lx Buffer: 0x%lx Count: %u MyFlags: %d",
stream, Buffer, Count, MyFlags));
(long) stream, (long) Buffer, Count, MyFlags));
if ((readbytes = (uint) fread(Buffer,sizeof(char),(size_t) Count,stream))
!= Count)
@ -81,7 +81,7 @@ uint my_fwrite(FILE *stream, const byte *Buffer, uint Count, myf MyFlags)
#endif
DBUG_ENTER("my_fwrite");
DBUG_PRINT("my",("stream: 0x%lx Buffer: 0x%lx Count: %u MyFlags: %d",
stream, Buffer, Count, MyFlags));
(long) stream, (long) Buffer, Count, MyFlags));
#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM)
errors=0;
@ -153,7 +153,7 @@ my_off_t my_fseek(FILE *stream, my_off_t pos, int whence,
{
DBUG_ENTER("my_fseek");
DBUG_PRINT("my",("stream: 0x%lx pos: %lu whence: %d MyFlags: %d",
stream, pos, whence, MyFlags));
(long) stream, (ulong) pos, whence, MyFlags));
DBUG_RETURN(fseek(stream, (off_t) pos, whence) ?
MY_FILEPOS_ERROR : (my_off_t) ftell(stream));
} /* my_seek */
@ -166,7 +166,7 @@ my_off_t my_ftell(FILE *stream, myf MyFlags __attribute__((unused)))
{
off_t pos;
DBUG_ENTER("my_ftell");
DBUG_PRINT("my",("stream: 0x%lx MyFlags: %d",stream, MyFlags));
DBUG_PRINT("my",("stream: 0x%lx MyFlags: %d", (long) stream, MyFlags));
pos=ftell(stream);
DBUG_PRINT("exit",("ftell: %lu",(ulong) pos));
DBUG_RETURN((my_off_t) pos);

View file

@ -45,7 +45,8 @@ int my_getwd(my_string buf, uint size, myf MyFlags)
{
my_string pos;
DBUG_ENTER("my_getwd");
DBUG_PRINT("my",("buf: 0x%lx size: %d MyFlags %d", buf,size,MyFlags));
DBUG_PRINT("my",("buf: 0x%lx size: %d MyFlags %d",
(long) buf, size, MyFlags));
#if ! defined(MSDOS)
if (curr_dir[0]) /* Current pos is saved here */

View file

@ -543,8 +543,11 @@ HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a)
case HA_KEYTYPE_DOUBLE:
a= end;
break;
case HA_KEYTYPE_END: /* purecov: inspected */
/* keep compiler happy */
DBUG_ASSERT(0);
break;
}
}
return keyseg;
}

View file

@ -625,7 +625,7 @@ MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags)
int m_used;
DBUG_ENTER("my_stat");
DBUG_PRINT("my", ("path: '%s', stat_area: 0x%lx, MyFlags: %d", path,
(byte *) stat_area, my_flags));
(long) stat_area, my_flags));
if ((m_used= (stat_area == NULL)))
if (!(stat_area = (MY_STAT *) my_malloc(sizeof(MY_STAT), my_flags)))

View file

@ -27,8 +27,8 @@ uint32 my_lread(int Filedes, byte *Buffer, uint32 Count, myf MyFlags)
{
uint32 readbytes;
DBUG_ENTER("my_lread");
DBUG_PRINT("my",("Fd: %d Buffer: %ld Count: %ld MyFlags: %d",
Filedes, Buffer, Count, MyFlags));
DBUG_PRINT("my",("Fd: %d Buffer: 0x%lx Count: %u MyFlags: %d",
Filedes, (long) Buffer, Count, MyFlags));
DBUG_PRINT("error", ("Deprecated my_lread() function should not be used."));

View file

@ -23,8 +23,8 @@ uint32 my_lwrite(int Filedes, const byte *Buffer, uint32 Count, myf MyFlags)
{
uint32 writenbytes;
DBUG_ENTER("my_lwrite");
DBUG_PRINT("my",("Fd: %d Buffer: 0x%lx Count: %ld MyFlags: %d",
Filedes, Buffer, Count, MyFlags));
DBUG_PRINT("my",("Fd: %d Buffer: 0x%lx Count: %u MyFlags: %d",
Filedes, (long) Buffer, Count, MyFlags));
DBUG_PRINT("error", ("Deprecated my_lwrite() function should not be used."));

View file

@ -44,7 +44,7 @@ gptr my_malloc(unsigned int size, myf my_flags)
}
else if (my_flags & MY_ZEROFILL)
bzero(point,size);
DBUG_PRINT("exit",("ptr: 0x%lx",point));
DBUG_PRINT("exit",("ptr: 0x%lx", (long) point));
DBUG_RETURN(point);
} /* my_malloc */
@ -55,7 +55,7 @@ gptr my_malloc(unsigned int size, myf my_flags)
void my_no_flags_free(gptr ptr)
{
DBUG_ENTER("my_free");
DBUG_PRINT("my",("ptr: 0x%lx",ptr));
DBUG_PRINT("my",("ptr: 0x%lx", (long) ptr));
if (ptr)
free(ptr);
DBUG_VOID_RETURN;

View file

@ -30,7 +30,7 @@ uint my_pread(File Filedes, byte *Buffer, uint Count, my_off_t offset,
int error;
DBUG_ENTER("my_pread");
DBUG_PRINT("my",("Fd: %d Seek: %lu Buffer: 0x%lx Count: %u MyFlags: %d",
Filedes, (ulong) offset, Buffer, Count, MyFlags));
Filedes, (ulong) offset, (long) Buffer, Count, MyFlags));
for (;;)
{
@ -49,8 +49,8 @@ uint my_pread(File Filedes, byte *Buffer, uint Count, my_off_t offset,
if (error)
{
my_errno=errno;
DBUG_PRINT("warning",("Read only %ld bytes off %ld from %d, errno: %d",
readbytes,Count,Filedes,my_errno));
DBUG_PRINT("warning",("Read only %u bytes off %u from %d, errno: %d",
readbytes, Count, Filedes, my_errno));
#ifdef THREAD
if ((readbytes == 0 || (int) readbytes == -1) && errno == EINTR)
{
@ -87,7 +87,7 @@ uint my_pwrite(int Filedes, const byte *Buffer, uint Count, my_off_t offset,
ulong written;
DBUG_ENTER("my_pwrite");
DBUG_PRINT("my",("Fd: %d Seek: %lu Buffer: 0x%lx Count: %d MyFlags: %d",
Filedes, (ulong) offset,Buffer, Count, MyFlags));
Filedes, (ulong) offset, (long) Buffer, Count, MyFlags));
errors=0; written=0L;
for (;;)

View file

@ -39,7 +39,7 @@ uint my_read(File Filedes, byte *Buffer, uint Count, myf MyFlags)
uint readbytes, save_count;
DBUG_ENTER("my_read");
DBUG_PRINT("my",("Fd: %d Buffer: 0x%lx Count: %u MyFlags: %d",
Filedes, Buffer, Count, MyFlags));
Filedes, (long) Buffer, Count, MyFlags));
save_count= Count;
for (;;)
@ -48,7 +48,7 @@ uint my_read(File Filedes, byte *Buffer, uint Count, myf MyFlags)
if ((readbytes= (uint) read(Filedes, Buffer, Count)) != Count)
{
my_errno= errno ? errno : -1;
DBUG_PRINT("warning",("Read only %ld bytes off %ld from %d, errno: %d",
DBUG_PRINT("warning",("Read only %u bytes off %u from %d, errno: %d",
readbytes, Count, Filedes, my_errno));
#ifdef THREAD
if ((readbytes == 0 || (int) readbytes == -1) && errno == EINTR)

View file

@ -27,8 +27,8 @@ gptr my_realloc(gptr oldpoint, uint size, myf my_flags)
{
gptr point;
DBUG_ENTER("my_realloc");
DBUG_PRINT("my",("ptr: 0x%lx size: %u my_flags: %d",oldpoint, size,
my_flags));
DBUG_PRINT("my",("ptr: 0x%lx size: %u my_flags: %d",
(long) oldpoint, size, my_flags));
if (!oldpoint && (my_flags & MY_ALLOW_ZERO_PTR))
DBUG_RETURN(my_malloc(size,my_flags));
@ -60,6 +60,6 @@ gptr my_realloc(gptr oldpoint, uint size, myf my_flags)
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_WAITTANG), size);
}
#endif
DBUG_PRINT("exit",("ptr: 0x%lx",point));
DBUG_PRINT("exit",("ptr: 0x%lx", (long) point));
DBUG_RETURN(point);
} /* my_realloc */

View file

@ -55,7 +55,7 @@ my_off_t my_seek(File fd, my_off_t pos, int whence,
if (newpos == (os_off_t) -1)
{
my_errno=errno;
DBUG_PRINT("error",("lseek: %lu, errno: %d",newpos,errno));
DBUG_PRINT("error",("lseek: %lu errno: %d", (ulong) newpos, errno));
DBUG_RETURN(MY_FILEPOS_ERROR);
}
if ((my_off_t) newpos != pos)

View file

@ -26,7 +26,8 @@
#endif
/* from my_init */
my_string home_dir=0,my_progname=0;
my_string home_dir=0;
const char *my_progname=0;
char NEAR curr_dir[FN_REFLEN]= {0},
NEAR home_dir_buff[FN_REFLEN]= {0};
ulong my_stream_opened=0,my_file_opened=0, my_tmp_file_created=0;

View file

@ -106,7 +106,7 @@ my_string my_tempnam(const char *dir, const char *pfx,
#ifdef OS2
/* changing environ variable doesn't work with VACPP */
char buffer[256], *end;
buffer[sizeof[buffer)-1]= 0;
buffer[sizeof(buffer)-1]= 0;
end= strxnmov(buffer, sizeof(buffer)-1, (char*) "TMP=", dir, NullS);
/* remove ending backslash */
if (end[-1] == '\\')

View file

@ -27,7 +27,7 @@ uint my_write(int Filedes, const byte *Buffer, uint Count, myf MyFlags)
ulong written;
DBUG_ENTER("my_write");
DBUG_PRINT("my",("Fd: %d Buffer: 0x%lx Count: %d MyFlags: %d",
Filedes, Buffer, Count, MyFlags));
Filedes, (long) Buffer, Count, MyFlags));
errors=0; written=0L;
for (;;)

View file

@ -185,8 +185,8 @@ extern "C" {
uint my_raid_write(File fd,const byte *Buffer, uint Count, myf MyFlags)
{
DBUG_ENTER("my_raid_write");
DBUG_PRINT("enter",("Fd: %d Buffer: %lx Count: %u MyFlags: %d",
fd, Buffer, Count, MyFlags));
DBUG_PRINT("enter",("Fd: %d Buffer: 0x%lx Count: %u MyFlags: %d",
fd, (long) Buffer, Count, MyFlags));
if (is_raid(fd))
{
RaidFd *raid= (*dynamic_element(&RaidFd::_raid_map,fd,RaidFd**));
@ -198,8 +198,8 @@ extern "C" {
uint my_raid_read(File fd, byte *Buffer, uint Count, myf MyFlags)
{
DBUG_ENTER("my_raid_read");
DBUG_PRINT("enter",("Fd: %d Buffer: %lx Count: %u MyFlags: %d",
fd, Buffer, Count, MyFlags));
DBUG_PRINT("enter",("Fd: %d Buffer: 0x%lx Count: %u MyFlags: %d",
fd, (long) Buffer, Count, MyFlags));
if (is_raid(fd))
{
RaidFd *raid= (*dynamic_element(&RaidFd::_raid_map,fd,RaidFd**));
@ -212,8 +212,9 @@ extern "C" {
myf MyFlags)
{
DBUG_ENTER("my_raid_pread");
DBUG_PRINT("enter",("Fd: %d Buffer: %lx Count: %u offset: %u MyFlags: %d",
Filedes, Buffer, Count, offset, MyFlags));
DBUG_PRINT("enter",
("Fd: %d Buffer: 0x%lx Count: %u offset: %lu MyFlags: %d",
Filedes, (long) Buffer, Count, (ulong) offset, MyFlags));
if (is_raid(Filedes))
{
assert(offset != MY_FILEPOS_ERROR);
@ -231,8 +232,8 @@ extern "C" {
my_off_t offset, myf MyFlags)
{
DBUG_ENTER("my_raid_pwrite");
DBUG_PRINT("enter",("Fd: %d Buffer: %lx Count: %u offset: %u MyFlags: %d",
Filedes, Buffer, Count, offset, MyFlags));
DBUG_PRINT("enter",("Fd: %d Buffer: 0x%lx Count: %u offset: %lu MyFlags: %d",
Filedes, (long) Buffer, Count, (ulong) offset, MyFlags));
if (is_raid(Filedes))
{
assert(offset != MY_FILEPOS_ERROR);
@ -250,8 +251,8 @@ extern "C" {
myf MyFlags)
{
DBUG_ENTER("my_raid_lock");
DBUG_PRINT("enter",("Fd: %d start: %u length: %u MyFlags: %d",
fd, start, length, MyFlags));
DBUG_PRINT("enter",("Fd: %d start: %lu length: %lu MyFlags: %d",
fd, (ulong) start, (ulong) length, MyFlags));
if (my_disable_locking)
DBUG_RETURN(0);
if (is_raid(fd))
@ -284,8 +285,8 @@ extern "C" {
int my_raid_chsize(File fd, my_off_t newlength, int filler, myf MyFlags)
{
DBUG_ENTER("my_raid_chsize");
DBUG_PRINT("enter",("Fd: %d newlength: %u MyFlags: %d",
fd, newlength, MyFlags));
DBUG_PRINT("enter",("Fd: %d newlength: %lu MyFlags: %d",
fd, (ulong) newlength, MyFlags));
if (is_raid(fd))
{
RaidFd *raid= (*dynamic_element(&RaidFd::_raid_map,fd,RaidFd**));
@ -413,7 +414,7 @@ RaidFd(uint raid_type, uint raid_chunks, ulong raid_chunksize)
_fd_vector(0)
{
DBUG_ENTER("RaidFd::RaidFd");
DBUG_PRINT("enter",("RaidFd_type: %u Disks: %u Chunksize: %d",
DBUG_PRINT("enter",("RaidFd_type: %u Disks: %u Chunksize: %lu",
raid_type, raid_chunks, raid_chunksize));
/* TODO: Here we should add checks if the malloc fails */
@ -622,7 +623,7 @@ Lock(int locktype, my_off_t start, my_off_t length, myf MyFlags)
{
DBUG_ENTER("RaidFd::Lock");
DBUG_PRINT("enter",("locktype: %d start: %lu length: %lu MyFlags: %d",
locktype, start, length, MyFlags));
locktype, (ulong) start, (ulong) length, MyFlags));
my_off_t bufptr = start;
// Loop until all data is locked
while(length)
@ -732,8 +733,8 @@ my_off_t RaidFd::
Tell(myf MyFlags)
{
DBUG_ENTER("RaidFd::Tell");
DBUG_PRINT("enter",("MyFlags: %d _position %d",
MyFlags,_position));
DBUG_PRINT("enter",("MyFlags: %d _position: %lu",
MyFlags, (ulong) _position));
DBUG_RETURN(_position);
}
@ -741,8 +742,8 @@ int RaidFd::
Chsize(File fd, my_off_t newlength, int filler, myf MyFlags)
{
DBUG_ENTER("RaidFd::Chsize");
DBUG_PRINT("enter",("Fd: %d, newlength: %d, MyFlags: %d",
fd, newlength,MyFlags));
DBUG_PRINT("enter",("Fd: %d newlength: %lu MyFlags: %d",
fd, (ulong) newlength, MyFlags));
_position = newlength;
Calculate();
uint _rounds = _total_block / _raid_chunks; // INT() assumed

View file

@ -194,7 +194,7 @@ gptr _mymalloc(uint size, const char *filename, uint lineno, myf MyFlags)
if ((MyFlags & MY_ZEROFILL) || !sf_malloc_quick)
bfill(data, size, (char) (MyFlags & MY_ZEROFILL ? 0 : ALLOC_VAL));
/* Return a pointer to the real data */
DBUG_PRINT("exit",("ptr: 0x%lx", data));
DBUG_PRINT("exit",("ptr: 0x%lx", (long) data));
if (sf_min_adress > data)
sf_min_adress= data;
if (sf_max_adress < data)
@ -259,7 +259,7 @@ void _myfree(gptr ptr, const char *filename, uint lineno, myf myflags)
{
struct st_irem *irem;
DBUG_ENTER("_myfree");
DBUG_PRINT("enter",("ptr: 0x%lx", ptr));
DBUG_PRINT("enter",("ptr: 0x%lx", (long) ptr));
if (!sf_malloc_quick)
(void) _sanity (filename, lineno);
@ -410,7 +410,7 @@ void TERMINATE(FILE *file)
}
DBUG_PRINT("safe",
("%6u bytes at 0x%09lx, allocated at line %4d in '%s'",
irem->datasize, data, irem->linenum, irem->filename));
irem->datasize, (long) data, irem->linenum, irem->filename));
irem= irem->next;
}
}
@ -447,7 +447,7 @@ static int _checkchunk(register struct st_irem *irem, const char *filename,
fprintf(stderr, " discovered at %s:%d\n", filename, lineno);
(void) fflush(stderr);
DBUG_PRINT("safe",("Underrun at 0x%lx, allocated at %s:%d",
data, irem->filename, irem->linenum));
(long) data, irem->filename, irem->linenum));
flag=1;
}
@ -463,7 +463,7 @@ static int _checkchunk(register struct st_irem *irem, const char *filename,
fprintf(stderr, " discovered at '%s:%d'\n", filename, lineno);
(void) fflush(stderr);
DBUG_PRINT("safe",("Overrun at 0x%lx, allocated at %s:%d",
data,
(long) data,
irem->filename,
irem->linenum));
flag=1;

View file

@ -436,7 +436,8 @@ int thr_lock(THR_LOCK_DATA *data,enum thr_lock_type lock_type)
data->thread_id=my_thread_id(); /* Must be reset ! */
VOID(pthread_mutex_lock(&lock->mutex));
DBUG_PRINT("lock",("data: 0x%lx thread: %ld lock: 0x%lx type: %d",
data,data->thread_id,lock,(int) lock_type));
(long) data, data->thread_id, (long) lock,
(int) lock_type));
check_locks(lock,(uint) lock_type <= (uint) TL_READ_NO_INSERT ?
"enter read_lock" : "enter write_lock",0);
if ((int) lock_type <= (int) TL_READ_NO_INSERT)
@ -598,8 +599,8 @@ int thr_lock(THR_LOCK_DATA *data,enum thr_lock_type lock_type)
goto end;
}
}
DBUG_PRINT("lock",("write locked by thread: %ld, type: %ld",
lock->read.data->thread_id,data->type));
DBUG_PRINT("lock",("write locked by thread: %ld type: %d",
lock->read.data->thread_id, (int) data->type));
}
DBUG_RETURN(wait_for_lock(&lock->write_wait,data,0));
}
@ -665,7 +666,7 @@ void thr_unlock(THR_LOCK_DATA *data)
enum thr_lock_type lock_type=data->type;
DBUG_ENTER("thr_unlock");
DBUG_PRINT("lock",("data: 0x%lx thread: %ld lock: 0x%lx",
data,data->thread_id,lock));
(long) data, data->thread_id, (long) lock));
pthread_mutex_lock(&lock->mutex);
check_locks(lock,"start of release lock",0);
@ -835,7 +836,7 @@ int thr_multi_lock(THR_LOCK_DATA **data,uint count)
{
THR_LOCK_DATA **pos,**end;
DBUG_ENTER("thr_multi_lock");
DBUG_PRINT("lock",("data: 0x%lx count: %d",data,count));
DBUG_PRINT("lock",("data: 0x%lx count: %d", (long) data, count));
if (count > 1)
sort_locks(data,count);
/* lock everything */
@ -907,7 +908,7 @@ void thr_multi_unlock(THR_LOCK_DATA **data,uint count)
{
THR_LOCK_DATA **pos,**end;
DBUG_ENTER("thr_multi_unlock");
DBUG_PRINT("lock",("data: 0x%lx count: %d",data,count));
DBUG_PRINT("lock",("data: 0x%lx count: %d", (long) data, count));
for (pos=data,end=data+count; pos < end ; pos++)
{
@ -921,7 +922,7 @@ void thr_multi_unlock(THR_LOCK_DATA **data,uint count)
else
{
DBUG_PRINT("lock",("Free lock: data: 0x%lx thread: %ld lock: 0x%lx",
*pos,(*pos)->thread_id,(*pos)->lock));
(long) *pos, (*pos)->thread_id, (long) (*pos)->lock));
}
}
DBUG_VOID_RETURN;

View file

@ -89,7 +89,7 @@ void init_tree(TREE *tree, uint default_alloc_size, uint memory_limit,
tree_element_free free_element, void *custom_arg)
{
DBUG_ENTER("init_tree");
DBUG_PRINT("enter",("tree: 0x%lx size: %d",tree,size));
DBUG_PRINT("enter",("tree: 0x%lx size: %d", (long) tree, size));
if (default_alloc_size < DEFAULT_ALLOC_SIZE)
default_alloc_size= DEFAULT_ALLOC_SIZE;
@ -137,7 +137,7 @@ void init_tree(TREE *tree, uint default_alloc_size, uint memory_limit,
static void free_tree(TREE *tree, myf free_flags)
{
DBUG_ENTER("free_tree");
DBUG_PRINT("enter",("tree: 0x%lx",tree));
DBUG_PRINT("enter",("tree: 0x%lx", (long) tree));
if (tree->root) /* If initialized */
{

View file

@ -49,7 +49,7 @@ int find_type(my_string x, TYPELIB *typelib, uint full_name)
reg1 my_string i;
reg2 const char *j;
DBUG_ENTER("find_type");
DBUG_PRINT("enter",("x: '%s' lib: 0x%lx",x,typelib));
DBUG_PRINT("enter",("x: '%s' lib: 0x%lx", x, (long) typelib));
if (!typelib->count)
{

View file

@ -1263,8 +1263,8 @@ CommandInterpreter::executeConnect(char* parameters)
int retval;
disconnect();
if (!emptyString(parameters)) {
if (retval = ndb_mgm_set_connectstring(m_mgmsrv,
BaseString(parameters).trim().c_str()))
if ((retval = ndb_mgm_set_connectstring(m_mgmsrv,
BaseString(parameters).trim().c_str())))
{
printError();
return retval;

View file

@ -15,7 +15,8 @@
#include "utils.h"
#include "regex2.h"
static int nope = 0; /* for use in asserts; shuts lint up */
/* for use in asserts */
#define nope 0
/* macros for manipulating states, small version */
#define states long

View file

@ -601,7 +601,7 @@ net_safe_read(MYSQL *mysql)
if (len == packet_error || len == 0)
{
DBUG_PRINT("error",("Wrong connection or packet. fd: %s len: %d",
DBUG_PRINT("error",("Wrong connection or packet. fd: %s len: %lu",
vio_description(net->vio),len));
#ifdef MYSQL_SERVER
if (vio_was_interrupted(net->vio))
@ -858,7 +858,7 @@ void STDCALL
mysql_free_result(MYSQL_RES *result)
{
DBUG_ENTER("mysql_free_result");
DBUG_PRINT("enter",("mysql_res: %lx",result));
DBUG_PRINT("enter",("mysql_res: 0x%lx", (ulong) result));
if (result)
{
MYSQL *mysql= result->handle;
@ -1174,7 +1174,7 @@ unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
{
uchar *pos;
/* fields count may be wrong */
DBUG_ASSERT ((field - result) < fields);
DBUG_ASSERT ((uint) (field - result) < fields);
cli_fetch_lengths(&lengths[0], row->data, default_value ? 8 : 7);
field->catalog = strdup_root(alloc,(char*) row->data[0]);
field->db = strdup_root(alloc,(char*) row->data[1]);
@ -1350,7 +1350,7 @@ MYSQL_DATA *cli_read_rows(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
DBUG_PRINT("info",("status: %u warning_count: %u",
mysql->server_status, mysql->warning_count));
}
DBUG_PRINT("exit",("Got %d rows",result->rows));
DBUG_PRINT("exit",("Got %lu rows", (ulong) result->rows));
DBUG_RETURN(result);
}
@ -2178,7 +2178,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
goto error;
#endif
DBUG_PRINT("exit",("Mysql handler: %lx",mysql));
DBUG_PRINT("exit",("Mysql handler: 0x%lx", (ulong) mysql));
reset_sigpipe(mysql);
DBUG_RETURN(mysql);
@ -2533,7 +2533,7 @@ int STDCALL
mysql_real_query(MYSQL *mysql, const char *query, ulong length)
{
DBUG_ENTER("mysql_real_query");
DBUG_PRINT("enter",("handle: %lx",mysql));
DBUG_PRINT("enter",("handle: 0x%lx", (ulong) mysql));
DBUG_PRINT("query",("Query = '%-.4096s'",query));
if (mysql_send_query(mysql,query,length))

View file

@ -899,7 +899,7 @@ my_system_gmt_sec(const MYSQL_TIME *t_src, long *my_timezone,
*/
if ((tmp < TIMESTAMP_MIN_VALUE) || (tmp > TIMESTAMP_MAX_VALUE))
tmp= 0;
end:
return (my_time_t) tmp;
} /* my_system_gmt_sec */

View file

@ -573,7 +573,8 @@ int ha_archive::write_row(byte * buf)
table->timestamp_field->set_time();
pthread_mutex_lock(&share->mutex);
written= gzwrite(share->archive_write, buf, table->reclength);
DBUG_PRINT("ha_archive::get_row", ("Wrote %d bytes expected %d", written, table->reclength));
DBUG_PRINT("ha_archive::get_row", ("Wrote %d bytes expected %d", (int) written,
table->reclength));
share->dirty= TRUE;
if (written != (z_off_t)table->reclength)
goto error;

View file

@ -3594,7 +3594,7 @@ ha_innobase::rnd_pos(
}
if (error) {
DBUG_PRINT("error",("Got error: %ld",error));
DBUG_PRINT("error",("Got error: %d", error));
DBUG_RETURN(error);
}
@ -3604,7 +3604,7 @@ ha_innobase::rnd_pos(
error = index_read(buf, pos, ref_length, HA_READ_KEY_EXACT);
if (error)
{
DBUG_PRINT("error",("Got error: %ld",error));
DBUG_PRINT("error",("Got error: %d", error));
}
change_active_index(keynr);

View file

@ -692,8 +692,8 @@ int ha_ndbcluster::get_ndb_blobs_value(NdbBlob *last_ndb_blob)
{
char *buf= m_blobs_buffer + offset;
uint32 len= 0xffffffff; // Max uint32
DBUG_PRINT("value", ("read blob ptr=%x len=%u",
(UintPtr)buf, (uint)blob_len));
DBUG_PRINT("value", ("read blob ptr: 0x%lx len: %u",
(ulong)buf, (uint)blob_len));
if (ndb_blob->readData(buf, len) != 0)
DBUG_RETURN(-1);
DBUG_ASSERT(len == blob_len);
@ -1484,7 +1484,7 @@ inline int ha_ndbcluster::next_result(byte *buf)
all pending update or delete operations should
be sent to NDB
*/
DBUG_PRINT("info", ("ops_pending: %d", m_ops_pending));
DBUG_PRINT("info", ("ops_pending: %lu", (ulong) m_ops_pending));
if (m_ops_pending)
{
// if (current_thd->transaction.on)
@ -2026,7 +2026,7 @@ int ha_ndbcluster::write_row(byte *record)
(ulong) next_val));
if (ndb->setAutoIncrementValue((const NDBTAB *) m_table, next_val, TRUE))
DBUG_PRINT("info",
("Setting next auto increment value to %u", next_val));
("Setting next auto increment value to %u", (uint) next_val));
}
m_skip_auto_increment= TRUE;
@ -2417,7 +2417,7 @@ void ha_ndbcluster::print_results()
break;
}
case NdbDictionary::Column::Int: {
fprintf(DBUG_FILE, "Int\t%lld", field->val_int());
fprintf(DBUG_FILE, "Int\t%ld", (long) field->val_int());
break;
}
case NdbDictionary::Column::Unsigned: {
@ -2787,7 +2787,7 @@ int ha_ndbcluster::close_scan()
Take over any pending transactions to the
deleteing/updating transaction before closing the scan
*/
DBUG_PRINT("info", ("ops_pending: %d", m_ops_pending));
DBUG_PRINT("info", ("ops_pending: %lu", (ulong) m_ops_pending));
if (execute_no_commit(this,trans) != 0) {
no_uncommitted_rows_execute_failure();
DBUG_RETURN(ndb_err(trans));
@ -3823,7 +3823,7 @@ static int create_ndb_column(NDBCOL &col,
col.setAutoIncrement(TRUE);
ulonglong value= info->auto_increment_value ?
info->auto_increment_value : (ulonglong) 1;
DBUG_PRINT("info", ("Autoincrement key, initial: %llu", value));
DBUG_PRINT("info", ("Autoincrement key, initial: %lu", (ulong) value));
col.setAutoIncrementInitialValue(value);
}
else
@ -3926,7 +3926,8 @@ int ha_ndbcluster::create(const char *name,
if (packfrm(data, length, &pack_data, &pack_length))
DBUG_RETURN(2);
DBUG_PRINT("info", ("setFrm data=%x, len=%d", pack_data, pack_length));
DBUG_PRINT("info", ("setFrm data: 0x%lx len: %u", (ulong) pack_data,
pack_length));
tab.setFrm(pack_data, pack_length);
my_free((char*)data, MYF(0));
my_free((char*)pack_data, MYF(0));
@ -3934,7 +3935,7 @@ int ha_ndbcluster::create(const char *name,
for (i= 0; i < form->fields; i++)
{
Field *field= form->field[i];
DBUG_PRINT("info", ("name: %s, type: %u, pack_length: %d",
DBUG_PRINT("info", ("name: %s type: %u pack_length: %d",
field->field_name, field->real_type(),
field->pack_length()));
if ((my_errno= create_ndb_column(col, field, info)))
@ -5221,14 +5222,14 @@ static int packfrm(const void *data, uint len,
uint blob_len;
frm_blob_struct* blob;
DBUG_ENTER("packfrm");
DBUG_PRINT("enter", ("data: %x, len: %d", data, len));
DBUG_PRINT("enter", ("data: 0x%lx len: %u", (ulong) data, len));
error= 1;
org_len= len;
if (my_compress((byte*)data, &org_len, &comp_len))
goto err;
DBUG_PRINT("info", ("org_len: %d, comp_len: %d", org_len, comp_len));
DBUG_PRINT("info", ("org_len: %lu comp_len: %lu", org_len, comp_len));
DBUG_DUMP("compressed", (char*)data, org_len);
error= 2;
@ -5248,7 +5249,8 @@ static int packfrm(const void *data, uint len,
*pack_len= blob_len;
error= 0;
DBUG_PRINT("exit", ("pack_data: %x, pack_len: %d", *pack_data, *pack_len));
DBUG_PRINT("exit", ("pack_data: 0x%lx pack_len: %u", (ulong) *pack_data,
*pack_len));
err:
DBUG_RETURN(error);
@ -5262,13 +5264,13 @@ static int unpackfrm(const void **unpack_data, uint *unpack_len,
byte *data;
ulong complen, orglen, ver;
DBUG_ENTER("unpackfrm");
DBUG_PRINT("enter", ("pack_data: %x", pack_data));
DBUG_PRINT("enter", ("pack_data: 0x%lx", (ulong) pack_data));
complen= uint4korr((char*)&blob->head.complen);
orglen= uint4korr((char*)&blob->head.orglen);
ver= uint4korr((char*)&blob->head.ver);
DBUG_PRINT("blob",("ver: %d complen: %d orglen: %d",
DBUG_PRINT("blob",("ver: %lu complen: %lu orglen: %lu",
ver,complen,orglen));
DBUG_DUMP("blob->data", (char*) blob->data, complen);
@ -5287,7 +5289,8 @@ static int unpackfrm(const void **unpack_data, uint *unpack_len,
*unpack_data= data;
*unpack_len= complen;
DBUG_PRINT("exit", ("frmdata: %x, len: %d", *unpack_data, *unpack_len));
DBUG_PRINT("exit", ("frmdata: 0x%lx len: %u", (ulong) *unpack_data,
*unpack_len));
DBUG_RETURN(0);
}
@ -5367,7 +5370,8 @@ ndb_get_table_statistics(ha_ndbcluster* file, bool report_error, Ndb* ndb,
* row_count= sum_rows;
if(commit_count)
* commit_count= sum_commits;
DBUG_PRINT("exit", ("records: %u commits: %u", sum_rows, sum_commits));
DBUG_PRINT("exit", ("records: %u commits: %u", (uint) sum_rows,
(uint) sum_commits));
DBUG_RETURN(0);
retry:

View file

@ -649,6 +649,8 @@ bool agg_item_charsets(DTCollation &coll, const char *fname,
doesn't display each argument's characteristics.
- if nargs is 1, then this error cannot happen.
*/
LINT_INIT(safe_args[0]);
LINT_INIT(safe_args[1]);
if (nargs >=2 && nargs <= 3)
{
safe_args[0]= args[0];

View file

@ -1758,7 +1758,7 @@ byte *in_row::get_value(Item *item)
void in_row::set(uint pos, Item *item)
{
DBUG_ENTER("in_row::set");
DBUG_PRINT("enter", ("pos %u item 0x%lx", pos, (ulong) item));
DBUG_PRINT("enter", ("pos: %u item: 0x%lx", pos, (ulong) item));
((cmp_item_row*) base)[pos].store_value_by_template(&tmp, item);
DBUG_VOID_RETURN;
}
@ -1840,7 +1840,7 @@ cmp_item* cmp_item_row::make_same()
cmp_item_row::~cmp_item_row()
{
DBUG_ENTER("~cmp_item_row");
DBUG_PRINT("enter",("this: %lx", this));
DBUG_PRINT("enter",("this: 0x%lx", (long) this));
if (comparators)
{
for (uint i= 0; i < n; i++)
@ -2433,7 +2433,7 @@ longlong Item_is_not_null_test::val_int()
if (!used_tables_cache && !with_subselect)
{
owner->was_null|= (!cached_value);
DBUG_PRINT("info", ("cached :%d", cached_value));
DBUG_PRINT("info", ("cached :%ld", (long) cached_value));
DBUG_RETURN(cached_value);
}
if (args[0]->is_null())

View file

@ -54,7 +54,7 @@ void Item_subselect::init(st_select_lex *select_lex,
{
DBUG_ENTER("Item_subselect::init");
DBUG_PRINT("subs", ("select_lex 0x%xl", (ulong) select_lex));
DBUG_PRINT("subs", ("select_lex: 0x%lx", (ulong) select_lex));
unit= select_lex->master_unit();
if (unit->item)

View file

@ -2255,8 +2255,8 @@ void MYSQL_LOG::report_pos_in_innodb()
if (is_open() && have_innodb == SHOW_OPTION_YES)
{
DBUG_PRINT("info", ("Reporting binlog info into InnoDB - "
"name: '%s' position: %d",
log_file_name, my_b_tell(&log_file)));
"name: '%s' position: %lu",
log_file_name, (ulong) my_b_tell(&log_file)));
innobase_store_binlog_offset_and_flush_log(log_file_name,
my_b_tell(&log_file));
}

View file

@ -2043,8 +2043,8 @@ Rotate_log_event::Rotate_log_event(THD* thd_arg,
#ifndef DBUG_OFF
char buff[22];
DBUG_ENTER("Rotate_log_event::Rotate_log_event(THD*,...)");
DBUG_PRINT("enter",("new_log_ident %s pos %s flags %lu", new_log_ident_arg,
llstr(pos_arg, buff), flags));
DBUG_PRINT("enter",("new_log_ident: %s pos: %s flags: %u",
new_log_ident_arg, llstr(pos_arg, buff), flags));
#endif
if (flags & DUP_NAME)
new_log_ident= my_strdup_with_length((byte*) new_log_ident_arg,
@ -2673,7 +2673,7 @@ Slave_log_event::Slave_log_event(THD* thd_arg,
memcpy(master_log, rli->group_master_log_name, master_log_len + 1);
master_port = mi->port;
master_pos = rli->group_master_log_pos;
DBUG_PRINT("info", ("master_log: %s pos: %d", master_log,
DBUG_PRINT("info", ("master_log: %s pos: %lu", master_log,
(ulong) master_pos));
}
else

View file

@ -1443,7 +1443,7 @@ static void server_init(void)
if (strlen(mysqld_unix_port) > (sizeof(UNIXaddr.sun_path) - 1))
{
sql_print_error("The socket file path is too long (> %lu): %s",
sql_print_error("The socket file path is too long (> %u): %s",
sizeof(UNIXaddr.sun_path) - 1, mysqld_unix_port);
unireg_abort(1);
}
@ -3188,7 +3188,7 @@ int main(int argc, char **argv)
{
if (global_system_variables.log_warnings)
sql_print_warning("Asked for %ld thread stack, but got %ld",
thread_stack, stack_size);
thread_stack, (long) stack_size);
thread_stack= stack_size;
}
}
@ -3668,7 +3668,7 @@ static void create_new_thread(THD *thd)
threads.append(thd);
if (thread_count-delayed_insert_threads > max_used_connections)
max_used_connections=thread_count-delayed_insert_threads;
DBUG_PRINT("info",(("creating thread %d"), thd->thread_id));
DBUG_PRINT("info",(("creating thread %lu"), thd->thread_id));
thd->connect_time = time(NULL);
if ((error=pthread_create(&thd->real_id,&connection_attrib,
handle_one_connection,
@ -4766,7 +4766,8 @@ master-ssl",
(gptr*) &locked_in_memory, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"merge", OPT_MERGE, "Enable Merge storage engine. Disable with \
--skip-merge.",
(gptr*) &opt_merge, (gptr*) &opt_merge, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0},
(gptr*) &opt_merge, (gptr*) &opt_merge, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0,
0, 0},
{"myisam-recover", OPT_MYISAM_RECOVER,
"Syntax: myisam-recover[=option[,option...]], where option can be DEFAULT, BACKUP, FORCE or QUICK.",
(gptr*) &myisam_recover_options_str, (gptr*) &myisam_recover_options_str, 0,

View file

@ -697,7 +697,7 @@ my_real_read(NET *net, ulong *complen)
{
my_bool interrupted = vio_should_retry(net->vio);
DBUG_PRINT("info",("vio_read returned %d, errno: %d",
DBUG_PRINT("info",("vio_read returned %ld errno: %d",
length, vio_errno(net->vio)));
#if (!defined(__WIN__) && !defined(__EMX__) && !defined(OS2)) || defined(MYSQL_SERVER)
/*

View file

@ -902,7 +902,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
double scan_time;
DBUG_ENTER("test_quick_select");
DBUG_PRINT("enter",("keys_to_use: %lu prev_tables: %lu const_tables: %lu",
keys_to_use.to_ulonglong(), (ulong) prev_tables,
(ulong) keys_to_use.to_ulonglong(), (ulong) prev_tables,
(ulong) const_tables));
delete quick;

View file

@ -2822,7 +2822,7 @@ server_errno=%d)",
return packet_error;
}
DBUG_PRINT("info",( "len=%u, net->read_pos[4] = %d\n",
DBUG_PRINT("info",( "len: %lu net->read_pos[4]: %d\n",
len, mysql->net.read_pos[4]));
return len - 1;
}
@ -3743,7 +3743,7 @@ static int process_io_rotate(MASTER_INFO *mi, Rotate_log_event *rev)
/* Safe copy as 'rev' has been "sanitized" in Rotate_log_event's ctor */
memcpy(mi->master_log_name, rev->new_log_ident, rev->ident_len+1);
mi->master_log_pos= rev->pos;
DBUG_PRINT("info", ("master_log_pos: '%s' %d",
DBUG_PRINT("info", ("master_log_pos: '%s' %lu",
mi->master_log_name, (ulong) mi->master_log_pos));
#ifndef DBUG_OFF
/*
@ -3849,7 +3849,7 @@ static int queue_old_event(MASTER_INFO *mi, const char *buf,
position in the master's log, we must use the original value.
*/
mi->master_log_pos += --event_len;
DBUG_PRINT("info", ("master_log_pos: %d", (ulong) mi->master_log_pos));
DBUG_PRINT("info", ("master_log_pos: %lu", (ulong) mi->master_log_pos));
pthread_mutex_unlock(&mi->data_lock);
my_free((char*)tmp_buf, MYF(0));
DBUG_RETURN(error);
@ -3870,7 +3870,7 @@ static int queue_old_event(MASTER_INFO *mi, const char *buf,
}
delete ev;
mi->master_log_pos+= inc_pos;
DBUG_PRINT("info", ("master_log_pos: %d", (ulong) mi->master_log_pos));
DBUG_PRINT("info", ("master_log_pos: %lu", (ulong) mi->master_log_pos));
pthread_mutex_unlock(&mi->data_lock);
DBUG_RETURN(0);
}
@ -3963,7 +3963,7 @@ int queue_event(MASTER_INFO* mi,const char* buf, ulong event_len)
DBUG_ASSERT(rli->ign_master_log_name_end[0]);
rli->ign_master_log_pos_end= mi->master_log_pos;
rli->relay_log.signal_update(); // the slave SQL thread needs to re-check
DBUG_PRINT("info", ("master_log_pos: %d, event originating from the same server, ignored", (ulong) mi->master_log_pos));
DBUG_PRINT("info", ("master_log_pos: %lu event originating from the same server, ignored", (ulong) mi->master_log_pos));
}
else
{
@ -3971,7 +3971,7 @@ int queue_event(MASTER_INFO* mi,const char* buf, ulong event_len)
if (likely(!(error= rli->relay_log.appendv(buf,event_len,0))))
{
mi->master_log_pos+= inc_pos;
DBUG_PRINT("info", ("master_log_pos: %d", (ulong) mi->master_log_pos));
DBUG_PRINT("info", ("master_log_pos: %lu", (ulong) mi->master_log_pos));
rli->relay_log.harvest_bytes_written(&rli->log_space_total);
}
rli->ign_master_log_name_end[0]= 0; // last event is not ignored

View file

@ -383,7 +383,7 @@ inline Query_cache_block * Query_cache_block_table::block()
void Query_cache_block::init(ulong block_length)
{
DBUG_ENTER("Query_cache_block::init");
DBUG_PRINT("qcache", ("init block 0x%lx length: %lu", (ulong) this,
DBUG_PRINT("qcache", ("init block: 0x%lx length: %lu", (ulong) this,
block_length));
length = block_length;
used = 0;
@ -528,7 +528,8 @@ void Query_cache_query::init_n_lock()
my_rwlock_init(&lock, NULL);
lock_writing();
DBUG_PRINT("qcache", ("inited & locked query for block 0x%lx",
((byte*) this)-ALIGN_SIZE(sizeof(Query_cache_block))));
(long) ((byte*) this) -
ALIGN_SIZE(sizeof(Query_cache_block))));
DBUG_VOID_RETURN;
}
@ -537,7 +538,8 @@ void Query_cache_query::unlock_n_destroy()
{
DBUG_ENTER("Query_cache_query::unlock_n_destroy");
DBUG_PRINT("qcache", ("destroyed & unlocked query for block 0x%lx",
((byte*)this)-ALIGN_SIZE(sizeof(Query_cache_block))));
(long) ((byte*) this) -
ALIGN_SIZE(sizeof(Query_cache_block))));
/*
The following call is not needed on system where one can destroy an
active semaphore
@ -1140,7 +1142,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
#ifndef EMBEDDED_LIBRARY
do
{
DBUG_PRINT("qcache", ("Results (len %lu, used %lu, headers %lu)",
DBUG_PRINT("qcache", ("Results (len: %lu used: %lu headers: %u)",
result_block->length, result_block->used,
result_block->headers_len()+
ALIGN_SIZE(sizeof(Query_cache_result))));
@ -1832,8 +1834,8 @@ Query_cache::append_result_data(Query_cache_block **current_block,
Query_cache_block *query_block)
{
DBUG_ENTER("Query_cache::append_result_data");
DBUG_PRINT("qcache", ("append %lu bytes to 0x%lx query",
data_len, query_block));
DBUG_PRINT("qcache", ("append: %lu bytes to: 0x%lx query",
data_len, (ulong) query_block));
if (query_block->query()->add(data_len) > query_cache_limit)
{
@ -3336,10 +3338,10 @@ void Query_cache::queries_dump()
Query_cache_query_flags flags;
memcpy(&flags, str+len, QUERY_CACHE_FLAGS_SIZE);
str[len]= 0; // make zero ending DB name
DBUG_PRINT("qcache", ("F:%u C:%u L:%lu T:'%s' (%u) '%s' '%s'",
DBUG_PRINT("qcache", ("F: %u C: %u L: %lu T: '%s' (%u) '%s' '%s'",
flags.client_long_flag,
flags.character_set_client_num,
(ulong)flags.limit, flags.time_zone->get_name(),
(ulong)flags.limit, flags.time_zone->get_name()->ptr(),
len, str, strend(str)+1));
DBUG_PRINT("qcache", ("-b- 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx", (ulong) block,
(ulong) block->next, (ulong) block->prev,
@ -3569,7 +3571,7 @@ my_bool Query_cache::check_integrity(bool not_locked)
default:
DBUG_PRINT("error",
("block 0x%lx have incorrect type %u",
block, block->type));
(ulong) block, block->type));
result = 1;
}
@ -3668,7 +3670,7 @@ my_bool Query_cache::check_integrity(bool not_locked)
if (count != bins[i].number)
{
DBUG_PRINT("error", ("bin[%d].number is %d, but bin have %d blocks",
bins[i].number, count));
i, bins[i].number, count));
result = 1;
}
}

View file

@ -156,9 +156,8 @@ bool foreign_key_prefix(Key *a, Key *b)
THD::THD()
:user_time(0), global_read_lock(0), is_fatal_error(0),
last_insert_id_used(0),
insert_id_used(0), rand_used(0), time_zone_used(0),
in_lock_tables(0), bootstrap(0)
rand_used(0), last_insert_id_used(0), insert_id_used(0),
time_zone_used(0), in_lock_tables(0), bootstrap(0)
{
current_arena= this;
host= user= priv_user= db= ip=0;
@ -616,7 +615,8 @@ void THD::add_changed_table(const char *key, long key_length)
{
list_include(prev_changed, curr, changed_table_dup(key, key_length));
DBUG_PRINT("info",
("key_length %u %u", key_length, (*prev_changed)->key_length));
("key_length: %ld %u", key_length,
(*prev_changed)->key_length));
DBUG_VOID_RETURN;
}
else if (cmp == 0)
@ -626,7 +626,7 @@ void THD::add_changed_table(const char *key, long key_length)
{
list_include(prev_changed, curr, changed_table_dup(key, key_length));
DBUG_PRINT("info",
("key_length %u %u", key_length,
("key_length: %ld %u", key_length,
(*prev_changed)->key_length));
DBUG_VOID_RETURN;
}
@ -638,7 +638,7 @@ void THD::add_changed_table(const char *key, long key_length)
}
}
*prev_changed = changed_table_dup(key, key_length);
DBUG_PRINT("info", ("key_length %u %u", key_length,
DBUG_PRINT("info", ("key_length: %ld %u", key_length,
(*prev_changed)->key_length));
DBUG_VOID_RETURN;
}

View file

@ -272,7 +272,7 @@ cleanup:
else
{
send_ok(thd,deleted);
DBUG_PRINT("info",("%d records deleted",deleted));
DBUG_PRINT("info",("%lu records deleted", (ulong) deleted));
}
DBUG_RETURN(0);
}

View file

@ -306,9 +306,9 @@ int check_user(THD *thd, enum enum_server_command command,
if (!(thd->master_access & NO_ACCESS)) // authentification is OK
{
DBUG_PRINT("info",
("Capabilities: %d packet_length: %ld Host: '%s' "
("Capabilities: %lu packet_length: %ld Host: '%s' "
"Login user: '%s' Priv_user: '%s' Using password: %s "
"Access: %u db: '%s'",
"Access: %lu db: '%s'",
thd->client_capabilities, thd->max_client_packet_length,
thd->host_or_ip, thd->user, thd->priv_user,
passwd_len ? "yes": "no",
@ -857,7 +857,7 @@ static int check_connection(THD *thd)
if (thd->client_capabilities & CLIENT_IGNORE_SPACE)
thd->variables.sql_mode|= MODE_IGNORE_SPACE;
#ifdef HAVE_OPENSSL
DBUG_PRINT("info", ("client capabilities: %d", thd->client_capabilities));
DBUG_PRINT("info", ("client capabilities: %lu", thd->client_capabilities));
if (thd->client_capabilities & CLIENT_SSL)
{
/* Do the SSL layering. */
@ -1003,7 +1003,7 @@ pthread_handler_decl(handle_one_connection,arg)
of handle_one_connection, which is thd. We need to know the
start of the stack so that we could check for stack overruns.
*/
DBUG_PRINT("info", ("handle_one_connection called by thread %d\n",
DBUG_PRINT("info", ("handle_one_connection called by thread %lu\n",
thd->thread_id));
// now that we've called my_thread_init(), it is safe to call DBUG_*

View file

@ -1394,7 +1394,7 @@ static int send_prepare_results(Prepared_statement *stmt, bool text_protocol)
enum enum_sql_command sql_command= lex->sql_command;
int res= 0;
DBUG_ENTER("send_prepare_results");
DBUG_PRINT("enter",("command: %d, param_count: %ld",
DBUG_PRINT("enter",("command: %d param_count: %u",
sql_command, stmt->param_count));
if ((&lex->select_lex != lex->all_selects_list ||

View file

@ -1017,7 +1017,7 @@ int change_master(THD* thd, MASTER_INFO* mi)
{
mi->master_log_pos= lex_mi->pos;
}
DBUG_PRINT("info", ("master_log_pos: %d", (ulong) mi->master_log_pos));
DBUG_PRINT("info", ("master_log_pos: %lu", (ulong) mi->master_log_pos));
if (lex_mi->host)
strmake(mi->host, lex_mi->host, sizeof(mi->host)-1);
@ -1129,7 +1129,7 @@ int change_master(THD* thd, MASTER_INFO* mi)
}
}
mi->rli.group_master_log_pos = mi->master_log_pos;
DBUG_PRINT("info", ("master_log_pos: %d", (ulong) mi->master_log_pos));
DBUG_PRINT("info", ("master_log_pos: %lu", (ulong) mi->master_log_pos));
/*
Coordinates in rli were spoilt by the 'if (need_relay_log_purge)' block,

View file

@ -6052,6 +6052,7 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
JOIN_TAB *join_tab;
int (*end_select)(JOIN *, struct st_join_table *,bool);
DBUG_ENTER("do_select");
LINT_INIT(join_tab);
List<Item> *columns_list= procedure ? &join->procedure_fields_list : fields;
join->procedure=procedure;
/*

View file

@ -2711,7 +2711,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
enum enum_duplicates handle_duplicates, bool ignore)
{
TABLE *table,*new_table;
int error;
int error= 0;
char tmp_name[80],old_name[32],new_name_buff[FN_REFLEN];
char new_alias_buff[FN_REFLEN], *table_name, *db, *new_alias, *alias;
char index_file[FN_REFLEN], data_file[FN_REFLEN];

View file

@ -407,7 +407,7 @@ int mysql_update(THD *thd,
send_ok(thd,
(thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated,
thd->insert_id_used ? thd->last_insert_id : 0L,buff);
DBUG_PRINT("info",("%d records updated",updated));
DBUG_PRINT("info",("%lu records updated", (ulong) updated));
}
thd->count_cuted_fields= CHECK_FIELD_IGNORE; /* calc cuted fields */
free_io_cache(table);
@ -495,7 +495,7 @@ static table_map get_table_map(List<Item> *items)
while ((item= (Item_field *) item_it++))
map|= item->used_tables();
DBUG_PRINT("info",("table_map: 0x%08x", map));
DBUG_PRINT("info",("table_map: 0x%08lx", (long) map));
return map;
}

View file

@ -150,7 +150,7 @@ uint find_type2(TYPELIB *typelib, const char *x, uint length, CHARSET_INFO *cs)
int find,pos;
const char *j;
DBUG_ENTER("find_type2");
DBUG_PRINT("enter",("x: '%s' lib: 0x%lx",x,typelib));
DBUG_PRINT("enter",("x: '%s' lib: 0x%lx",x, (long) typelib));
if (!typelib->count)
{

View file

@ -87,7 +87,7 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
SQL_CRYPT *crypted=0;
MEM_ROOT **root_ptr, *old_root;
DBUG_ENTER("openfrm");
DBUG_PRINT("enter",("name: '%s' form: %lx",name,outparam));
DBUG_PRINT("enter",("name: '%s' form: 0x%lx", name, (ulong) outparam));
bzero((char*) outparam,sizeof(*outparam));
outparam->blob_ptr_size=sizeof(char*);

View file

@ -948,8 +948,8 @@ TIME_to_gmt_sec(const TIME *t, const TIME_ZONE_INFO *sp, bool *in_dst_time_gap)
*/
if (shift)
{
if (local_t > (TIMESTAMP_MAX_VALUE - shift*86400L +
sp->revtis[i].rt_offset - saved_seconds))
if (local_t > (my_time_t) (TIMESTAMP_MAX_VALUE - shift*86400L +
sp->revtis[i].rt_offset - saved_seconds))
{
DBUG_RETURN(0); /* my_time_t overflow */
}

View file

@ -358,14 +358,14 @@ static uint pack_keys(uchar *keybuff, uint key_count, KEY *keyinfo,
key_parts+=key->key_parts;
DBUG_PRINT("loop",("flags: %d key_parts: %d at %lx",
key->flags,key->key_parts,
key->key_part));
(long) key->key_part));
for (key_part=key->key_part,key_part_end=key_part+key->key_parts ;
key_part != key_part_end ;
key_part++)
{
uint offset;
DBUG_PRINT("loop",("field: %d startpos: %lu length: %ld",
DBUG_PRINT("loop",("field: %d startpos: %lu length: %d",
key_part->fieldnr, key_part->offset + data_offset,
key_part->length));
int2store(pos,key_part->fieldnr+1+FIELD_NAME_USED);

View file

@ -0,0 +1,56 @@
#
# cmd-line-utils is not important in 4.1
#
.*/cmd-line-utils/readline/* : .*comparison is always true.*
.*/cmd-line-utils/readline/* : .*discards qualifiers from pointer target type.*
.*/cmd-line-utils/readline/* : .*may be used uninitialized in this.*
#
# not important in 4.1
#
my_tempnam.c: .*the use of `tempnam' is dangerous, better use `mkstemp'.*
#
# bdb is not critical to keep up to date
#
.*/bdb/.* : .*discards qualifiers from pointer target type.*
.*/bdb/.* : .*unused parameter.*
.*/bdb/.* : .*may be used uninitialized.*
.*/bdb/.* : .*empty body in an if-statement.*
db_vrfy.c : .*comparison is always false due to limited range of data type.*
#
# Ignore all conversion warnings on windows 64
# (Is safe as we are not yet supporting strings >= 2G)
#
.* : conversion from '__int64' to .*int'.*
.* : conversion from '__int64' to 'uint8'.*
.* : conversion from '__int64' to 'uint32'.*
.* : conversion from '__int64' to 'u.*long'.*
.* : conversion from '__int64' to 'long'.*
.* : conversion from '__int64' to 'off_t'.*
.* : conversion from '.*size_t' to .*int'.*
.* : conversion from '.*size_t' to 'TaoCrypt::word32'.*
.* : conversion from '.*size_t' to 'u.*long'.*
.* : conversion from '.*size_t' to 'uint32'.*
.* : conversion from '.*size_t' to 'off_t'.*
.* : conversion from '.*size_t' to 'size_s'.*
#
# innobase is not critical in 4.1 to be kept up-to-date
#
.*/innobase/.* : .*unused parameter.*
.*/innobase/.* : .*may be used uninitialized in.*
#
# The following should be fixed by the ndb team
#
.*/ndb/.* : .*used uninitialized in this function.*
.*/ndb/.* : .*unused variable.*
.*/ndb/.* : .*defined but not used.*
.*/ndb/.* : .*format.*expects type.*
.*/ndb/.* : .*has virtual functions but non-virtual destructor.*
.*/ndb/.* : .*comparison between signed and unsigned integer expressions.*
.*/ndb/.* : .*deprecated conversion from string constant to.*
.*/ndb/.* : .*enumeration value.*not handled in switch.*
.*/ndb/.* : .*enumeral and non-enumeral type in conditional expression.*

View file

@ -767,6 +767,7 @@ static void verify_field_count(MYSQL_RES *result, uint exp_count)
/* Utility function to execute a query using prepare-execute */
#ifndef EMBEDDED_LIBRARY
static void execute_prepare_query(const char *query, ulonglong exp_count)
{
MYSQL_STMT *stmt;
@ -787,7 +788,7 @@ static void execute_prepare_query(const char *query, ulonglong exp_count)
DIE_UNLESS(affected_rows == exp_count);
mysql_stmt_close(stmt);
}
#endif
/* Store result processing */
@ -11716,6 +11717,7 @@ static void test_bug12001()
DIE_UNLESS(res==1);
}
#ifndef EMBEDDED_LIBRARY
static void test_bug12744()
{
MYSQL_STMT *prep_stmt = NULL;
@ -11746,6 +11748,7 @@ static void test_bug12744()
}
rc= mysql_stmt_close(prep_stmt);
}
#endif
/*
Bug#11718: query with function, join and order by returns wrong type