summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorunknown <monty@nosik.monty.fi>2006-11-22 14:11:36 +0200
committerunknown <monty@nosik.monty.fi>2006-11-22 14:11:36 +0200
commitb8fe9fb47f6b30aa72c16642ca51d84650169817 (patch)
treebd11d4efaf1d6469e7f29237347f12cdf71e605a /mysys
parent7463704e1c706ea8e76e4d0022383dfd776e458e (diff)
parent886965303155d1c2fbd90e3606fd192d4ba7741b (diff)
downloadmariadb-git-b8fe9fb47f6b30aa72c16642ca51d84650169817.tar.gz
Merge mysql.com:/home/my/mysql-5.0
into mysql.com:/home/my/mysql-5.1 BitKeeper/etc/ignore: auto-union BitKeeper/deleted/.del-my_lread.c: Auto merged BitKeeper/deleted/.del-my_lwrite.c: Auto merged client/mysqlbinlog.cc: Auto merged client/mysqldump.c: Auto merged cmd-line-utils/readline/complete.c: Auto merged extra/yassl/src/ssl.cpp: Auto merged libmysql/libmysql.c: Auto merged libmysqld/libmysqld.c: Auto merged mysql-test/mysql-test-run-shell.sh: Auto merged mysql-test/t/create.test: Auto merged mysql-test/t/csv.test: Auto merged mysql-test/t/ctype_cp1250_ch.test: Auto merged mysql-test/t/ctype_ucs.test: Auto merged mysql-test/t/func_sapdb.test: Auto merged mysql-test/t/func_str.test: Auto merged mysql-test/t/grant.test: Auto merged mysql-test/t/group_min_max.test: Auto merged mysql-test/t/innodb.test: Auto merged mysql-test/t/join.test: Auto merged mysql-test/t/select.test: Auto merged mysql-test/t/sp-prelocking.test: Auto merged mysql-test/t/strict.test: Auto merged mysql-test/t/subselect.test: Auto merged mysql-test/t/type_newdecimal.test: Auto merged mysql-test/t/view_grant.test: Auto merged mysys/default.c: Auto merged mysys/mf_iocache.c: Auto merged mysys/mf_keycache.c: Auto merged mysys/my_alloc.c: Auto merged mysys/my_dup.c: Auto merged mysys/my_getwd.c: Auto merged mysys/my_handler.c: Auto merged mysys/my_lib.c: Auto merged mysys/my_malloc.c: Auto merged mysys/my_pread.c: Auto merged mysys/my_seek.c: Auto merged mysys/safemalloc.c: Auto merged sql/Makefile.am: Auto merged sql/filesort.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_subselect.cc: Auto merged sql/log_event.cc: Auto merged sql/net_serv.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_cache.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_delete.cc: Auto merged sql/sql_repl.cc: Auto merged sql-common/client.c: Auto merged sql-common/my_time.c: Auto merged sql/sql_select.cc: Auto merged sql/sql_update.cc: Auto merged sql/strfunc.cc: Auto merged sql/tztime.cc: Auto merged sql/unireg.cc: Auto merged storage/heap/_check.c: Auto merged storage/heap/hp_delete.c: Auto merged storage/heap/hp_hash.c: Auto merged storage/heap/hp_open.c: Auto merged storage/heap/hp_rkey.c: Auto merged storage/heap/hp_rrnd.c: Auto merged storage/heap/hp_write.c: Auto merged storage/myisam/ha_myisam.cc: Auto merged storage/myisam/mi_close.c: Auto merged storage/myisam/mi_delete.c: Auto merged storage/myisam/mi_dynrec.c: Auto merged storage/myisam/mi_keycache.c: Auto merged storage/myisam/mi_page.c: Auto merged storage/myisam/mi_statrec.c: Auto merged storage/myisam/mi_test2.c: Auto merged storage/myisam/mi_write.c: Auto merged storage/myisam/myisampack.c: Auto merged storage/myisammrg/ha_myisammrg.cc: Auto merged storage/myisammrg/myrg_extra.c: Auto merged storage/ndb/include/logger/LogHandler.hpp: Auto merged storage/ndb/include/util/OutputStream.hpp: Auto merged storage/ndb/src/common/debugger/EventLogger.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/BackupSignalData.cpp: Auto merged storage/ndb/src/common/logger/LogHandler.cpp: Auto merged storage/ndb/src/common/portlib/NdbMutex.c: Auto merged storage/ndb/src/common/portlib/NdbThread.c: Auto merged storage/ndb/src/common/transporter/Transporter.cpp: Auto merged storage/ndb/src/cw/cpcd/CPCD.hpp: Auto merged storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp: Auto merged storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp: Auto merged storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp: Auto merged storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp: Auto merged storage/ndb/src/kernel/error/ErrorReporter.cpp: Auto merged storage/ndb/src/kernel/error/ErrorReporter.hpp: Auto merged storage/ndb/src/kernel/error/ndbd_exit_codes.c: Auto merged storage/ndb/src/kernel/vm/TransporterCallback.cpp: Auto merged storage/ndb/src/mgmapi/mgmapi.cpp: Auto merged storage/ndb/src/mgmclient/CommandInterpreter.cpp: Auto merged storage/ndb/src/mgmsrv/MgmtSrvr.cpp: Auto merged storage/ndb/src/mgmsrv/Services.cpp: Auto merged storage/ndb/src/ndbapi/ClusterMgr.cpp: Auto merged storage/ndb/src/ndbapi/DictCache.cpp: Auto merged storage/ndb/src/ndbapi/Ndb.cpp: Auto merged storage/ndb/src/ndbapi/NdbOperationExec.cpp: Auto merged storage/ndb/src/ndbapi/NdbOperationInt.cpp: Auto merged storage/ndb/src/ndbapi/NdbTransaction.cpp: Auto merged storage/ndb/src/ndbapi/Ndbif.cpp: Auto merged storage/ndb/tools/drop_index.cpp: Auto merged storage/ndb/tools/drop_tab.cpp: Auto merged storage/ndb/tools/ndb_condig.cpp: Auto merged tests/mysql_client_test.c: Auto merged vio/viossl.c: Auto merged vio/viosslfactories.c: Auto merged BUILD/SETUP.sh: Use local version client/client_priv.h: Manual merge mysql-test/mysql-test-run.pl: Manual merge mysql-test/r/ctype_cp1250_ch.result: Manual merge mysql-test/t/disabled.def: Manual merge mysys/hash.c: Manual merge mysys/thr_lock.c: Manual merge server-tools/instance-manager/mysql_connection.cc: Manual merge sql/ha_ndbcluster.cc: Manual merge sql/handler.cc: Manual merge sql/item_timefunc.cc: Manual merge sql/mysqld.cc: Manual merge sql/opt_range.cc: Manual merge sql/slave.cc: Manual merge sql/sql_parse.cc: Manual merge sql/sql_prepare.cc: Manual merge sql/sql_view.cc: Manual merge sql/table.cc: Manual merge storage/archive/ha_archive.cc: Manual merge storage/federated/ha_federated.cc: Manual merge storage/federated/ha_federated.h: Manual merge storage/innobase/handler/ha_innodb.cc: Manual merge storage/ndb/include/ndb_global.h.in: Manual merge storage/ndb/include/util/InputStream.hpp: Manual merge storage/ndb/include/util/SimpleProperties.hpp: Manual merge storage/ndb/src/kernel/blocks/backup/Backup.cpp: Manual merge storage/ndb/src/ndbapi/NdbOperationDefine.cpp: Manual merge storage/ndb/src/ndbapi/NdbOperationSearch.cpp: Manual merge storage/ndb/src/ndbapi/Ndbinit.cpp: Manual merge storage/ndb/src/ndbapi/ndb_cluster_connection.cpp: Manual merge strings/decimal.c: Manual merge vio/viosocket.c: Manual merge
Diffstat (limited to 'mysys')
-rw-r--r--mysys/default.c6
-rw-r--r--mysys/hash.c13
-rw-r--r--mysys/list.c2
-rw-r--r--mysys/mf_iocache.c9
-rw-r--r--mysys/mf_keycache.c32
-rw-r--r--mysys/mf_keycaches.c4
-rw-r--r--mysys/my_alloc.c13
-rw-r--r--mysys/my_dup.c2
-rw-r--r--mysys/my_fopen.c6
-rw-r--r--mysys/my_fstream.c8
-rw-r--r--mysys/my_getwd.c2
-rw-r--r--mysys/my_lib.c2
-rw-r--r--mysys/my_malloc.c4
-rw-r--r--mysys/my_pread.c8
-rw-r--r--mysys/my_read.c6
-rw-r--r--mysys/my_realloc.c4
-rw-r--r--mysys/my_seek.c2
-rw-r--r--mysys/my_write.c2
-rw-r--r--mysys/safemalloc.c10
-rw-r--r--mysys/thr_lock.c15
-rw-r--r--mysys/tree.c4
-rw-r--r--mysys/typelib.c2
22 files changed, 80 insertions, 76 deletions
diff --git a/mysys/default.c b/mysys/default.c
index 863ebc37dbc..b3c6b8ed72a 100644
--- a/mysys/default.c
+++ b/mysys/default.c
@@ -488,7 +488,7 @@ static int search_default_file(Process_option_func opt_handler,
my_bool have_ext= fn_ext(config_file)[0] != 0;
const char **exts_to_use= have_ext ? empty_list : f_extensions;
- for (ext= (char**) exts_to_use; *ext; *ext++)
+ for (ext= (char**) exts_to_use; *ext; ext++)
{
int error;
if ((error= search_default_file_with_ext(opt_handler, handler_ctx,
@@ -676,7 +676,7 @@ static int search_default_file_with_ext(Process_option_func opt_handler,
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;
@@ -869,7 +869,7 @@ void my_print_default_files(const char *conf_file)
{
for (dirs=default_directories ; *dirs; dirs++)
{
- for (ext= (char**) exts_to_use; *ext; *ext++)
+ for (ext= (char**) exts_to_use; *ext; ext++)
{
const char *pos;
char *end;
diff --git a/mysys/hash.c b/mysys/hash.c
index 165745986dc..1e7f96ac8d5 100644
--- a/mysys/hash.c
+++ b/mysys/hash.c
@@ -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%lx", hash));
+ DBUG_PRINT("enter",("hash: 0x%lx", (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);
@@ -644,7 +644,8 @@ 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
@@ -655,12 +656,12 @@ 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: %u seeks: %d max links: %d hitrate: %.2f",
records,seek,max_links,(float) seek / (float) records));
return error;
}
diff --git a/mysys/list.c b/mysys/list.c
index 0e55c9399f5..c4ce5b5e36f 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: 0x%lx element: 0x%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 */
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c
index 249eaf48ad2..e0962999015 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -594,7 +594,8 @@ 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);
@@ -656,7 +657,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;
@@ -732,7 +733,7 @@ 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)
@@ -871,7 +872,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;
diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c
index e6f4348968f..5327116f131 100644
--- a/mysys/mf_keycache.c
+++ b/mysys/mf_keycache.c
@@ -404,9 +404,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,
@@ -621,7 +621,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;
@@ -640,7 +640,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,
@@ -1073,7 +1073,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);
@@ -1092,7 +1092,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));
}
}
@@ -1345,11 +1345,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",
- (uint) file, (ulong) filepos,
- (uint) wrmode));
+ DBUG_PRINT("enter", ("fd: %d pos: %lu wrmode: %d",
+ file, (ulong) filepos, wrmode));
+ KEYCACHE_DBUG_PRINT("find_key_block", ("fd: %d pos: %lu wrmode: %d",
+ file, (ulong) filepos,
+ wrmode));
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
DBUG_EXECUTE("check_keycache2",
test_key_cache(keycache, "start of find_key_block", 0););
@@ -1641,8 +1641,8 @@ 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",
- (uint) file, (ulong) filepos, block->status,
+ ("fd: %d pos: %lu block->status: %u page_status: %u",
+ file, (ulong) filepos, block->status,
(uint) page_status));
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
@@ -2341,7 +2341,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)
@@ -2546,7 +2546,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);
diff --git a/mysys/mf_keycaches.c b/mysys/mf_keycaches.c
index 38fef31fdd4..e5086014a27 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: 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);
diff --git a/mysys/my_alloc.c b/mysys/my_alloc.c
index 9f3676618eb..883f350798f 100644
--- a/mysys/my_alloc.c
+++ b/mysys/my_alloc.c
@@ -48,7 +48,8 @@ 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;
@@ -146,7 +147,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: 0x%lx", mem_root));
+ DBUG_PRINT("enter",("root: 0x%lx", (long) mem_root));
DBUG_ASSERT(alloc_root_inited(mem_root));
@@ -160,8 +161,8 @@ gptr alloc_root(MEM_ROOT *mem_root,unsigned int Size)
next->next= mem_root->used;
next->size= Size;
mem_root->used= next;
- DBUG_PRINT("exit",("ptr: 0x%lx", (((char*) next)+
- ALIGN_SIZE(sizeof(USED_MEM)))));
+ DBUG_PRINT("exit",("ptr: 0x%lx", (long) (((char*) next)+
+ ALIGN_SIZE(sizeof(USED_MEM)))));
DBUG_RETURN((gptr) (((char*) next)+ALIGN_SIZE(sizeof(USED_MEM))));
#else
uint get_size, block_size;
@@ -169,7 +170,7 @@ gptr alloc_root(MEM_ROOT *mem_root,unsigned int Size)
reg1 USED_MEM *next= 0;
reg2 USED_MEM **prev;
DBUG_ENTER("alloc_root");
- DBUG_PRINT("enter",("root: 0x%lx", mem_root));
+ DBUG_PRINT("enter",("root: 0x%lx", (long) mem_root));
DBUG_ASSERT(alloc_root_inited(mem_root));
Size= ALIGN_SIZE(Size);
@@ -328,7 +329,7 @@ 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 */
diff --git a/mysys/my_dup.c b/mysys/my_dup.c
index 1fdb4db7276..8f891beb390 100644
--- a/mysys/my_dup.c
+++ b/mysys/my_dup.c
@@ -29,7 +29,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");
diff --git a/mysys/my_fopen.c b/mysys/my_fopen.c
index f07beec9f39..6e81d40a2d6 100644
--- a/mysys/my_fopen.c
+++ b/mysys/my_fopen.c
@@ -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 */
diff --git a/mysys/my_fstream.c b/mysys/my_fstream.c
index 5b17e3ff51c..0f7f4cc888f 100644
--- a/mysys/my_fstream.c
+++ b/mysys/my_fstream.c
@@ -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, (long) 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);
diff --git a/mysys/my_getwd.c b/mysys/my_getwd.c
index de8ad108ba4..be880680dfa 100644
--- a/mysys/my_getwd.c
+++ b/mysys/my_getwd.c
@@ -37,7 +37,7 @@ 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 (curr_dir[0]) /* Current pos is saved here */
VOID(strmake(buf,&curr_dir[0],size-1));
diff --git a/mysys/my_lib.c b/mysys/my_lib.c
index 76c31a8fbae..5d04359c7c0 100644
--- a/mysys/my_lib.c
+++ b/mysys/my_lib.c
@@ -529,7 +529,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)))
diff --git a/mysys/my_malloc.c b/mysys/my_malloc.c
index 9dd5530bd28..dac9a5357fd 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: 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;
diff --git a/mysys/my_pread.c b/mysys/my_pread.c
index 45a4a363c0a..9824d9bbab4 100644
--- a/mysys/my_pread.c
+++ b/mysys/my_pread.c
@@ -30,7 +30,7 @@ uint my_pread(File Filedes, byte *Buffer, uint Count, my_off_t offset,
int error= 0;
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 (;;)
{
@@ -72,8 +72,8 @@ uint my_pread(File Filedes, byte *Buffer, uint Count, my_off_t offset,
#endif
if (error || readbytes != Count)
{
- DBUG_PRINT("warning",("Read only %ld bytes off %ld from %d, errno: %d",
- readbytes,Count,Filedes,my_errno));
+ DBUG_PRINT("warning",("Read only %d bytes off %u from %d, errno: %d",
+ (int) readbytes, Count,Filedes,my_errno));
#ifdef THREAD
if ((readbytes == 0 || (int) readbytes == -1) && errno == EINTR)
{
@@ -110,7 +110,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 (;;)
diff --git a/mysys/my_read.c b/mysys/my_read.c
index 8b88e483fef..33eb3ddf334 100644
--- a/mysys/my_read.c
+++ b/mysys/my_read.c
@@ -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,8 +48,8 @@ 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",
- readbytes, Count, Filedes, my_errno));
+ DBUG_PRINT("warning",("Read only %d bytes off %u from %d, errno: %d",
+ (int) readbytes, Count, Filedes, my_errno));
#ifdef THREAD
if ((readbytes == 0 || (int) readbytes == -1) && errno == EINTR)
{
diff --git a/mysys/my_realloc.c b/mysys/my_realloc.c
index a385bf1e530..b521ae36b94 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: 0x%lx size: %u my_flags: %d",oldpoint, size,
+ DBUG_PRINT("my",("ptr: 0x%lx size: %u my_flags: %d", (long) 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: 0x%lx",point));
+ DBUG_PRINT("exit",("ptr: 0x%lx", (long) point));
DBUG_RETURN(point);
} /* my_realloc */
diff --git a/mysys/my_seek.c b/mysys/my_seek.c
index 269d1a65b31..e6f66041ccc 100644
--- a/mysys/my_seek.c
+++ b/mysys/my_seek.c
@@ -61,7 +61,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)
diff --git a/mysys/my_write.c b/mysys/my_write.c
index ae8cb4ab02b..26b9a4f2444 100644
--- a/mysys/my_write.c
+++ b/mysys/my_write.c
@@ -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 (;;)
diff --git a/mysys/safemalloc.c b/mysys/safemalloc.c
index 518a6a5fdd0..1983139c762 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: 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;
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c
index a2c42ee326c..f1b2cceb67a 100644
--- a/mysys/thr_lock.c
+++ b/mysys/thr_lock.c
@@ -483,8 +483,8 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_OWNER *owner,
data->owner= owner; /* Must be reset ! */
VOID(pthread_mutex_lock(&lock->mutex));
DBUG_PRINT("lock",("data: 0x%lx thread: 0x%lx lock: 0x%lx type: %d",
- data, data->owner->info->thread_id,
- lock, (int) lock_type));
+ (long) data, data->owner->info->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)
@@ -659,7 +659,7 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_OWNER *owner,
goto end;
}
}
- DBUG_PRINT("lock",("write locked by thread: 0x%lx, type: %ld",
+ DBUG_PRINT("lock",("write locked by thread: 0x%lx, type: %d",
lock->read.data->owner->info->thread_id, data->type));
}
wait_queue= &lock->write_wait;
@@ -740,7 +740,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: 0x%lx lock: 0x%lx",
- data, data->owner->info->thread_id, lock));
+ (long) data, data->owner->info->thread_id, (long) lock));
pthread_mutex_lock(&lock->mutex);
check_locks(lock,"start of release lock",0);
@@ -913,7 +913,7 @@ thr_multi_lock(THR_LOCK_DATA **data, uint count, THR_LOCK_OWNER *owner)
{
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 */
@@ -986,7 +986,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++)
{
@@ -1000,7 +1000,8 @@ 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)->owner->info->thread_id, (*pos)->lock));
+ (long) *pos, (*pos)->owner->info->thread_id,
+ (long) (*pos)->lock));
}
}
DBUG_VOID_RETURN;
diff --git a/mysys/tree.c b/mysys/tree.c
index 0c9c04919b0..abbc99b2445 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: 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 */
{
diff --git a/mysys/typelib.c b/mysys/typelib.c
index 90a093b0b32..d329b687668 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: 0x%lx",x,typelib));
+ DBUG_PRINT("enter",("x: '%s' lib: 0x%lx", x, (long) typelib));
if (!typelib->count)
{