diff options
author | unknown <monty@mysql.com> | 2004-08-23 13:47:52 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-08-23 13:47:52 +0300 |
commit | f0c1dadbdbe51241f169f6378cd98c7964dc2a1f (patch) | |
tree | 32095a2c9e113e57ea404fff75abd4f8a5452af3 /mysys | |
parent | 40f282d593b83453344136144b7071d9b6e4c025 (diff) | |
parent | f7d0dfd9e8966a6c4c885ade872273dddd36e228 (diff) | |
download | mariadb-git-f0c1dadbdbe51241f169f6378cd98c7964dc2a1f.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
mysys/mf_keycache.c:
Auto merged
mysys/my_lib.c:
Auto merged
sql/sql_select.cc:
Auto merged
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/hash.c | 4 | ||||
-rw-r--r-- | mysys/list.c | 2 | ||||
-rw-r--r-- | mysys/mf_iocache.c | 4 | ||||
-rw-r--r-- | mysys/mf_keycache.c | 31 | ||||
-rw-r--r-- | mysys/mf_keycaches.c | 4 | ||||
-rw-r--r-- | mysys/my_alloc.c | 6 | ||||
-rw-r--r-- | mysys/my_fopen.c | 6 | ||||
-rw-r--r-- | mysys/my_fstream.c | 8 | ||||
-rw-r--r-- | mysys/my_getwd.c | 2 | ||||
-rw-r--r-- | mysys/my_lib.c | 2 | ||||
-rw-r--r-- | mysys/my_lwrite.c | 2 | ||||
-rw-r--r-- | mysys/my_malloc.c | 4 | ||||
-rw-r--r-- | mysys/my_pread.c | 4 | ||||
-rw-r--r-- | mysys/my_read.c | 2 | ||||
-rw-r--r-- | mysys/my_realloc.c | 4 | ||||
-rw-r--r-- | mysys/my_write.c | 2 | ||||
-rw-r--r-- | mysys/safemalloc.c | 8 | ||||
-rw-r--r-- | mysys/thr_alarm.c | 4 | ||||
-rw-r--r-- | mysys/thr_lock.c | 18 | ||||
-rw-r--r-- | mysys/thr_mutex.c | 4 | ||||
-rw-r--r-- | mysys/tree.c | 4 | ||||
-rw-r--r-- | mysys/typelib.c | 2 |
22 files changed, 64 insertions, 63 deletions
diff --git a/mysys/hash.c b/mysys/hash.c index 11cbbd6b898..ce25ae89b63 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -52,7 +52,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: %lx size: %d",hash,size)); + DBUG_PRINT("enter",("hash: 0x%lx size: %d",hash,size)); hash->records=0; if (my_init_dynamic_array_ci(&hash->array,sizeof(HASH_LINK),size,0)) @@ -565,7 +565,7 @@ 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: %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,hash_info->data,rec_link)); error=1; } else diff --git a/mysys/list.c b/mysys/list.c index 17028e8e183..64fca10dc0b 100644 --- a/mysys/list.c +++ b/mysys/list.c @@ -28,7 +28,7 @@ LIST *list_add(LIST *root, LIST *element) { DBUG_ENTER("list_add"); - DBUG_PRINT("enter",("root: %lx element: %lx", root, element)); + DBUG_PRINT("enter",("root: 0x%lx element: %lx", root, element)); if (root) { if (root->prev) /* If add in mid of list */ diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c index f16f2b7ab72..f109df912f1 100644 --- a/mysys/mf_iocache.c +++ b/mysys/mf_iocache.c @@ -140,7 +140,7 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize, uint min_cache; my_off_t end_of_file= ~(my_off_t) 0; DBUG_ENTER("init_io_cache"); - DBUG_PRINT("enter",("cache: %lx type: %d pos: %ld", + DBUG_PRINT("enter",("cache: 0x%lx type: %d pos: %ld", (ulong) info, (int) type, (ulong) seek_offset)); info->file= file; @@ -290,7 +290,7 @@ my_bool reinit_io_cache(IO_CACHE *info, enum cache_type type, pbool clear_cache) { DBUG_ENTER("reinit_io_cache"); - DBUG_PRINT("enter",("cache: %lx type: %d seek_offset: %lu clear_cache: %d", + DBUG_PRINT("enter",("cache: 0x%lx type: %d seek_offset: %lu clear_cache: %d", (ulong) info, type, (ulong) seek_offset, (int) clear_cache)); diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c index de3bfc5d30b..11aadbed6c1 100644 --- a/mysys/mf_keycache.c +++ b/mysys/mf_keycache.c @@ -401,8 +401,8 @@ int init_key_cache(KEY_CACHE *keycache, uint key_cache_block_size, keycache->waiting_for_hash_link.last_thread= NULL; keycache->waiting_for_block.last_thread= NULL; DBUG_PRINT("exit", - ("disk_blocks: %d block_root: %lx hash_entries: %d\ - hash_root: %lx hash_links: %d hash_link_root %lx", + ("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)); @@ -596,7 +596,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: %lx", keycache)); + DBUG_PRINT("enter", ("key_cache: 0x%lx", keycache)); if (!keycache->key_cache_inited) DBUG_VOID_RETURN; @@ -1109,7 +1109,7 @@ static inline void link_hash(HASH_LINK **start, HASH_LINK *hash_link) static void unlink_hash(KEY_CACHE *keycache, HASH_LINK *hash_link) { - KEYCACHE_DBUG_PRINT("unlink_hash", ("file %u, filepos %lu #requests=%u", + KEYCACHE_DBUG_PRINT("unlink_hash", ("fd: %u pos_ %lu #requests=%u", (uint) hash_link->file,(ulong) hash_link->diskpos, hash_link->requests)); KEYCACHE_DBUG_ASSERT(hash_link->requests == 0); if ((*hash_link->prev= hash_link->next)) @@ -1167,7 +1167,7 @@ static HASH_LINK *get_hash_link(KEY_CACHE *keycache, int cnt; #endif - KEYCACHE_DBUG_PRINT("get_hash_link", ("file %u, filepos %lu", + KEYCACHE_DBUG_PRINT("get_hash_link", ("fd: %u pos: %lu", (uint) file,(ulong) filepos)); restart: @@ -1193,7 +1193,7 @@ restart: for (i=0, hash_link= *start ; i < cnt ; i++, hash_link= hash_link->next) { - KEYCACHE_DBUG_PRINT("get_hash_link", ("file %u, filepos %lu", + KEYCACHE_DBUG_PRINT("get_hash_link", ("fd: %u pos: %lu", (uint) hash_link->file,(ulong) hash_link->diskpos)); } } @@ -1285,10 +1285,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", ("file %u, filepos %lu, wrmode %lu", - (uint) file, (ulong) filepos, (uint) wrmode)); - KEYCACHE_DBUG_PRINT("find_key_block", ("file %u, filepos %lu, wrmode %lu", - (uint) file, (ulong) filepos, (uint) wrmode)); + 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", + (uint) file, (ulong) filepos, + (uint) wrmode)); #if !defined(DBUG_OFF) && defined(EXTRA_DEBUG) DBUG_EXECUTE("check_keycache2", test_key_cache(keycache, "start of find_key_block", 0);); @@ -1542,7 +1543,7 @@ restart: KEYCACHE_DBUG_ASSERT(page_status != -1); *page_st=page_status; KEYCACHE_DBUG_PRINT("find_key_block", - ("file %u, filepos %lu, page_status %lu", + ("fd: %u pos %lu page_status %lu", (uint) file,(ulong) filepos,(uint) page_status)); #if !defined(DBUG_OFF) && defined(EXTRA_DEBUG) @@ -1678,7 +1679,7 @@ byte *key_cache_read(KEY_CACHE *keycache, uint offset= 0; byte *start= buff; DBUG_ENTER("key_cache_read"); - DBUG_PRINT("enter", ("file %u, filepos %lu, length %u", + DBUG_PRINT("enter", ("fd: %u pos: %lu length: %u", (uint) file, (ulong) filepos, length)); if (keycache->can_be_used) @@ -1814,7 +1815,7 @@ int key_cache_insert(KEY_CACHE *keycache, byte *buff, uint length) { DBUG_ENTER("key_cache_insert"); - DBUG_PRINT("enter", ("file %u, filepos %lu, length %u", + DBUG_PRINT("enter", ("fd: %u pos: %lu length: %u", (uint) file,(ulong) filepos, length)); if (keycache->can_be_used) @@ -1926,7 +1927,7 @@ int key_cache_write(KEY_CACHE *keycache, int error=0; DBUG_ENTER("key_cache_write"); DBUG_PRINT("enter", - ("file %u filepos %lu length %u block_length %u key_block_length: %u", + ("fd: %u pos: %lu length: %u block_length: %u key_block_length: %u", (uint) file, (ulong) filepos, length, block_length, keycache ? keycache->key_cache_block_size : 0)); @@ -2396,7 +2397,7 @@ int flush_key_blocks(KEY_CACHE *keycache, { int res; DBUG_ENTER("flush_key_blocks"); - DBUG_PRINT("enter", ("keycache: %lx", keycache)); + DBUG_PRINT("enter", ("keycache: 0x%lx", keycache)); if (keycache->disk_blocks <= 0) DBUG_RETURN(0); diff --git a/mysys/mf_keycaches.c b/mysys/mf_keycaches.c index 806f83dc7d8..20465f3d23b 100644 --- a/mysys/mf_keycaches.c +++ b/mysys/mf_keycaches.c @@ -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: %lx", result)); + DBUG_PRINT("exit",("data: 0x%lx", 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: %lx", length, key, data)); + DBUG_PRINT("enter",("key: %.*s data: 0x%lx", length, key, data)); rw_wrlock(&hash->mutex); entry= (SAFE_HASH_ENTRY*) hash_search(&hash->hash, key, length); diff --git a/mysys/my_alloc.c b/mysys/my_alloc.c index 34a03391bc4..c9784ddc9a0 100644 --- a/mysys/my_alloc.c +++ b/mysys/my_alloc.c @@ -26,7 +26,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: %lx", mem_root)); + DBUG_PRINT("enter",("root: 0x%lx", mem_root)); mem_root->free= mem_root->used= mem_root->pre_alloc= 0; mem_root->min_malloc= 32; mem_root->block_size= block_size-MALLOC_OVERHEAD-sizeof(USED_MEM)-8; @@ -121,7 +121,7 @@ gptr alloc_root(MEM_ROOT *mem_root,unsigned int Size) #if defined(HAVE_purify) && defined(EXTRA_DEBUG) reg1 USED_MEM *next; DBUG_ENTER("alloc_root"); - DBUG_PRINT("enter",("root: %lx", mem_root)); + DBUG_PRINT("enter",("root: 0x%lx", mem_root)); Size+=ALIGN_SIZE(sizeof(USED_MEM)); if (!(next = (USED_MEM*) my_malloc(Size,MYF(MY_WME)))) @@ -222,7 +222,7 @@ void free_root(MEM_ROOT *root, myf MyFlags) { reg1 USED_MEM *next,*old; DBUG_ENTER("free_root"); - DBUG_PRINT("enter",("root: %lx flags: %u", root, (uint) MyFlags)); + DBUG_PRINT("enter",("root: 0x%lx flags: %u", root, (uint) MyFlags)); if (!root) /* QQ: Should be deleted */ DBUG_VOID_RETURN; /* purecov: inspected */ diff --git a/mysys/my_fopen.c b/mysys/my_fopen.c index 8906a288b11..e918b7b0de2 100644 --- a/mysys/my_fopen.c +++ b/mysys/my_fopen.c @@ -54,7 +54,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: %lx",fd)); + DBUG_PRINT("exit",("stream: 0x%lx",fd)); DBUG_RETURN(fd); } pthread_mutex_unlock(&THR_LOCK_open); @@ -78,7 +78,7 @@ int my_fclose(FILE *fd, myf MyFlags) { int err,file; DBUG_ENTER("my_fclose"); - DBUG_PRINT("my",("stream: %lx MyFlags: %d",fd, MyFlags)); + DBUG_PRINT("my",("stream: 0x%lx MyFlags: %d",fd, MyFlags)); pthread_mutex_lock(&THR_LOCK_open); file=fileno(fd); @@ -138,7 +138,7 @@ FILE *my_fdopen(File Filedes, const char *name, int Flags, myf MyFlags) pthread_mutex_unlock(&THR_LOCK_open); } - DBUG_PRINT("exit",("stream: %lx",fd)); + DBUG_PRINT("exit",("stream: 0x%lx",fd)); DBUG_RETURN(fd); } /* my_fdopen */ diff --git a/mysys/my_fstream.c b/mysys/my_fstream.c index 94f3aaf3464..00fe5c7a009 100644 --- a/mysys/my_fstream.c +++ b/mysys/my_fstream.c @@ -39,7 +39,7 @@ uint my_fread(FILE *stream, byte *Buffer, uint Count, myf MyFlags) { uint readbytes; DBUG_ENTER("my_fread"); - DBUG_PRINT("my",("stream: %lx Buffer: %lx Count: %u MyFlags: %d", + DBUG_PRINT("my",("stream: 0x%lx Buffer: 0x%lx Count: %u MyFlags: %d", stream, Buffer, Count, MyFlags)); if ((readbytes = (uint) fread(Buffer,sizeof(char),(size_t) Count,stream)) @@ -80,7 +80,7 @@ uint my_fwrite(FILE *stream, const byte *Buffer, uint Count, myf MyFlags) uint errors; #endif DBUG_ENTER("my_fwrite"); - DBUG_PRINT("my",("stream: %lx Buffer: %lx Count: %u MyFlags: %d", + DBUG_PRINT("my",("stream: 0x%lx Buffer: 0x%lx Count: %u MyFlags: %d", stream, Buffer, Count, MyFlags)); #if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM) @@ -150,7 +150,7 @@ my_off_t my_fseek(FILE *stream, my_off_t pos, int whence, myf MyFlags __attribute__((unused))) { DBUG_ENTER("my_fseek"); - DBUG_PRINT("my",("stream: %lx pos: %lu whence: %d MyFlags: %d", + DBUG_PRINT("my",("stream: 0x%lx pos: %lu whence: %d MyFlags: %d", stream, pos, whence, MyFlags)); DBUG_RETURN(fseek(stream, (off_t) pos, whence) ? MY_FILEPOS_ERROR : (my_off_t) ftell(stream)); @@ -164,7 +164,7 @@ my_off_t my_ftell(FILE *stream, myf MyFlags __attribute__((unused))) { off_t pos; DBUG_ENTER("my_ftell"); - DBUG_PRINT("my",("stream: %lx MyFlags: %d",stream, MyFlags)); + DBUG_PRINT("my",("stream: 0x%lx MyFlags: %d",stream, MyFlags)); pos=ftell(stream); DBUG_PRINT("exit",("ftell: %lu",(ulong) pos)); DBUG_RETURN((my_off_t) pos); diff --git a/mysys/my_getwd.c b/mysys/my_getwd.c index fd47c532cff..d6f647254e8 100644 --- a/mysys/my_getwd.c +++ b/mysys/my_getwd.c @@ -45,7 +45,7 @@ int my_getwd(my_string buf, uint size, myf MyFlags) { my_string pos; DBUG_ENTER("my_getwd"); - DBUG_PRINT("my",("buf: %lx size: %d MyFlags %d", buf,size,MyFlags)); + DBUG_PRINT("my",("buf: 0x%lx size: %d MyFlags %d", buf,size,MyFlags)); #if ! defined(MSDOS) if (curr_dir[0]) /* Current pos is saved here */ diff --git a/mysys/my_lib.c b/mysys/my_lib.c index 055e00d2efc..c3b0b57e549 100644 --- a/mysys/my_lib.c +++ b/mysys/my_lib.c @@ -613,7 +613,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: %lx, MyFlags: %d", path, + DBUG_PRINT("my", ("path: '%s', stat_area: 0x%lx, MyFlags: %d", path, (byte *) stat_area, my_flags)); if ((m_used= (stat_area == NULL))) diff --git a/mysys/my_lwrite.c b/mysys/my_lwrite.c index e1a3decd053..3b9afdbd71f 100644 --- a/mysys/my_lwrite.c +++ b/mysys/my_lwrite.c @@ -23,7 +23,7 @@ uint32 my_lwrite(int Filedes, const byte *Buffer, uint32 Count, myf MyFlags) { uint32 writenbytes; DBUG_ENTER("my_lwrite"); - DBUG_PRINT("my",("Fd: %d Buffer: %lx Count: %ld MyFlags: %d", + DBUG_PRINT("my",("Fd: %d Buffer: 0x%lx Count: %ld MyFlags: %d", Filedes, Buffer, Count, MyFlags)); /* Temp hack to get count to int32 while write wants int */ diff --git a/mysys/my_malloc.c b/mysys/my_malloc.c index df9fe1f9bc4..3f601a42dc9 100644 --- a/mysys/my_malloc.c +++ b/mysys/my_malloc.c @@ -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: %lx",point)); + DBUG_PRINT("exit",("ptr: 0x%lx",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: %lx",ptr)); + DBUG_PRINT("my",("ptr: 0x%lx",ptr)); if (ptr) free(ptr); DBUG_VOID_RETURN; diff --git a/mysys/my_pread.c b/mysys/my_pread.c index 661ef48ab3e..6a55a3cd8de 100644 --- a/mysys/my_pread.c +++ b/mysys/my_pread.c @@ -29,7 +29,7 @@ uint my_pread(File Filedes, byte *Buffer, uint Count, my_off_t offset, uint readbytes; int error; DBUG_ENTER("my_pread"); - DBUG_PRINT("my",("Fd: %d Seek: %lu Buffer: %lx Count: %u MyFlags: %d", + DBUG_PRINT("my",("Fd: %d Seek: %lu Buffer: 0x%lx Count: %u MyFlags: %d", Filedes, (ulong) offset, Buffer, Count, MyFlags)); for (;;) @@ -82,7 +82,7 @@ uint my_pwrite(int Filedes, const byte *Buffer, uint Count, my_off_t offset, uint writenbytes,errors; ulong written; DBUG_ENTER("my_pwrite"); - DBUG_PRINT("my",("Fd: %d Seek: %lu Buffer: %lx Count: %d MyFlags: %d", + DBUG_PRINT("my",("Fd: %d Seek: %lu Buffer: 0x%lx Count: %d MyFlags: %d", Filedes, (ulong) offset,Buffer, Count, MyFlags)); errors=0; written=0L; diff --git a/mysys/my_read.c b/mysys/my_read.c index b7621ac99eb..9de070e772d 100644 --- a/mysys/my_read.c +++ b/mysys/my_read.c @@ -38,7 +38,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: %lx Count: %u MyFlags: %d", + DBUG_PRINT("my",("Fd: %d Buffer: 0x%lx Count: %u MyFlags: %d", Filedes, Buffer, Count, MyFlags)); save_count=Count; diff --git a/mysys/my_realloc.c b/mysys/my_realloc.c index 5190fa75dce..c8edb172890 100644 --- a/mysys/my_realloc.c +++ b/mysys/my_realloc.c @@ -27,7 +27,7 @@ gptr my_realloc(gptr oldpoint, uint size, myf my_flags) { gptr point; DBUG_ENTER("my_realloc"); - DBUG_PRINT("my",("ptr: %lx size: %u my_flags: %d",oldpoint, size, + DBUG_PRINT("my",("ptr: 0x%lx size: %u my_flags: %d",oldpoint, size, my_flags)); if (!oldpoint && (my_flags & MY_ALLOW_ZERO_PTR)) @@ -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: %lx",point)); + DBUG_PRINT("exit",("ptr: 0x%lx",point)); DBUG_RETURN(point); } /* my_realloc */ diff --git a/mysys/my_write.c b/mysys/my_write.c index 61fd6097e28..37d885f04cd 100644 --- a/mysys/my_write.c +++ b/mysys/my_write.c @@ -26,7 +26,7 @@ uint my_write(int Filedes, const byte *Buffer, uint Count, myf MyFlags) uint writenbytes,errors; ulong written; DBUG_ENTER("my_write"); - DBUG_PRINT("my",("Fd: %d Buffer: %lx Count: %d MyFlags: %d", + DBUG_PRINT("my",("Fd: %d Buffer: 0x%lx Count: %d MyFlags: %d", Filedes, Buffer, Count, MyFlags)); errors=0; written=0L; diff --git a/mysys/safemalloc.c b/mysys/safemalloc.c index 07c40fd91b6..6cdf98c5f5f 100644 --- a/mysys/safemalloc.c +++ b/mysys/safemalloc.c @@ -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: %lx", data)); + DBUG_PRINT("exit",("ptr: 0x%lx", 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: %lx", ptr)); + DBUG_PRINT("enter",("ptr: 0x%lx", ptr)); if (!sf_malloc_quick) (void) _sanity (filename, lineno); @@ -446,7 +446,7 @@ static int _checkchunk(register struct st_irem *irem, const char *filename, irem->filename, irem->linenum); fprintf(stderr, " discovered at %s:%d\n", filename, lineno); (void) fflush(stderr); - DBUG_PRINT("safe",("Underrun at %lx, allocated at %s:%d", + DBUG_PRINT("safe",("Underrun at 0x%lx, allocated at %s:%d", data, irem->filename, irem->linenum)); flag=1; } @@ -462,7 +462,7 @@ static int _checkchunk(register struct st_irem *irem, const char *filename, irem->filename, irem->linenum); fprintf(stderr, " discovered at '%s:%d'\n", filename, lineno); (void) fflush(stderr); - DBUG_PRINT("safe",("Overrun at %lx, allocated at %s:%d", + DBUG_PRINT("safe",("Overrun at 0x%lx, allocated at %s:%d", data, irem->filename, irem->linenum)); diff --git a/mysys/thr_alarm.c b/mysys/thr_alarm.c index 84a8e779ae1..caef1caaf3d 100644 --- a/mysys/thr_alarm.c +++ b/mysys/thr_alarm.c @@ -257,9 +257,9 @@ void thr_end_alarm(thr_alarm_t *alarmed) if (!found) { if (*alarmed) - fprintf(stderr,"Warning: Didn't find alarm %lx in queue of %d alarms\n", + fprintf(stderr,"Warning: Didn't find alarm 0x%lx in queue of %d alarms\n", (long) *alarmed, alarm_queue.elements); - DBUG_PRINT("warning",("Didn't find alarm %lx in queue\n", + DBUG_PRINT("warning",("Didn't find alarm 0x%lx in queue\n", (long) *alarmed)); } pthread_mutex_unlock(&LOCK_alarm); diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c index 0e3ccfc0452..d9e46fe1beb 100644 --- a/mysys/thr_lock.c +++ b/mysys/thr_lock.c @@ -435,7 +435,7 @@ int thr_lock(THR_LOCK_DATA *data,enum thr_lock_type lock_type) data->thread=pthread_self(); /* Must be reset ! */ data->thread_id=my_thread_id(); /* Must be reset ! */ VOID(pthread_mutex_lock(&lock->mutex)); - DBUG_PRINT("lock",("data: %lx thread: %ld lock: %lx type: %d", + DBUG_PRINT("lock",("data: 0x%lx thread: %ld lock: 0x%lx type: %d", data,data->thread_id,lock,(int) lock_type)); check_locks(lock,(uint) lock_type <= (uint) TL_READ_NO_INSERT ? "enter read_lock" : "enter write_lock",0); @@ -656,7 +656,7 @@ void thr_unlock(THR_LOCK_DATA *data) THR_LOCK *lock=data->lock; enum thr_lock_type lock_type=data->type; DBUG_ENTER("thr_unlock"); - DBUG_PRINT("lock",("data: %lx thread: %ld lock: %lx", + DBUG_PRINT("lock",("data: 0x%lx thread: %ld lock: 0x%lx", data,data->thread_id,lock)); pthread_mutex_lock(&lock->mutex); check_locks(lock,"start of release lock",0); @@ -827,7 +827,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: %lx count: %d",data,count)); + DBUG_PRINT("lock",("data: 0x%lx count: %d",data,count)); if (count > 1) sort_locks(data,count); /* lock everything */ @@ -839,7 +839,7 @@ int thr_multi_lock(THR_LOCK_DATA **data,uint count) DBUG_RETURN(1); } #ifdef MAIN - printf("Thread: %s Got lock: %lx type: %d\n",my_thread_name(), + printf("Thread: %s Got lock: 0x%lx type: %d\n",my_thread_name(), (long) pos[0]->lock, pos[0]->type); fflush(stdout); #endif } @@ -899,12 +899,12 @@ void thr_multi_unlock(THR_LOCK_DATA **data,uint count) { THR_LOCK_DATA **pos,**end; DBUG_ENTER("thr_multi_unlock"); - DBUG_PRINT("lock",("data: %lx count: %d",data,count)); + DBUG_PRINT("lock",("data: 0x%lx count: %d",data,count)); for (pos=data,end=data+count; pos < end ; pos++) { #ifdef MAIN - printf("Thread: %s Rel lock: %lx type: %d\n", + printf("Thread: %s Rel lock: 0x%lx type: %d\n", my_thread_name(), (long) pos[0]->lock, pos[0]->type); fflush(stdout); #endif @@ -912,7 +912,7 @@ void thr_multi_unlock(THR_LOCK_DATA **data,uint count) thr_unlock(*pos); else { - DBUG_PRINT("lock",("Free lock: data: %lx thread: %ld lock: %lx", + DBUG_PRINT("lock",("Free lock: data: 0x%lx thread: %ld lock: 0x%lx", *pos,(*pos)->thread_id,(*pos)->lock)); } } @@ -1098,7 +1098,7 @@ static void thr_print_lock(const char* name,struct st_lock_list *list) prev= &list->data; for (data=list->data; data && count++ < MAX_LOCKS ; data=data->next) { - printf("%lx (%lu:%d); ",(ulong) data,data->thread_id,(int) data->type); + printf("0x%lx (%lu:%d); ",(ulong) data,data->thread_id,(int) data->type); if (data->prev != prev) printf("\nWarning: prev didn't point at previous lock\n"); prev= &data->next; @@ -1120,7 +1120,7 @@ void thr_print_locks(void) { THR_LOCK *lock=(THR_LOCK*) list->data; VOID(pthread_mutex_lock(&lock->mutex)); - printf("lock: %lx:",(ulong) lock); + printf("lock: 0x%lx:",(ulong) lock); if ((lock->write_wait.data || lock->read_wait.data) && (! lock->read.data && ! lock->write.data)) printf(" WARNING: "); diff --git a/mysys/thr_mutex.c b/mysys/thr_mutex.c index 8ebe5be22e8..bbcfaa8bba6 100644 --- a/mysys/thr_mutex.c +++ b/mysys/thr_mutex.c @@ -210,7 +210,7 @@ int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp, const char *file, if (mp->count++) { fprintf(stderr, - "safe_mutex: Count was %d in thread %lx when locking mutex at %s, line %d\n", + "safe_mutex: Count was %d in thread 0x%lx when locking mutex at %s, line %d\n", mp->count-1, my_thread_id(), file, line); fflush(stderr); abort(); @@ -248,7 +248,7 @@ int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp, if (mp->count++) { fprintf(stderr, - "safe_mutex: Count was %d in thread %lx when locking mutex at %s, line %d (error: %d (%d))\n", + "safe_mutex: Count was %d in thread 0x%lx when locking mutex at %s, line %d (error: %d (%d))\n", mp->count-1, my_thread_id(), file, line, error, error); fflush(stderr); abort(); diff --git a/mysys/tree.c b/mysys/tree.c index 063c8739e58..bec1ec680f1 100644 --- a/mysys/tree.c +++ b/mysys/tree.c @@ -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: %lx size: %d",tree,size)); + DBUG_PRINT("enter",("tree: 0x%lx size: %d",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: %lx",tree)); + DBUG_PRINT("enter",("tree: 0x%lx",tree)); if (tree->root) /* If initialized */ { diff --git a/mysys/typelib.c b/mysys/typelib.c index 9aaf97d143f..90a093b0b32 100644 --- a/mysys/typelib.c +++ b/mysys/typelib.c @@ -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: %lx",x,typelib)); + DBUG_PRINT("enter",("x: '%s' lib: 0x%lx",x,typelib)); if (!typelib->count) { |