summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorunknown <monty@mysql.com/nosik.monty.fi>2006-11-27 18:16:08 +0200
committerunknown <monty@mysql.com/nosik.monty.fi>2006-11-27 18:16:08 +0200
commit4555818f142b532875dcab073dac1168f284739b (patch)
tree20c7910ad3251fb39027f6528cd4c0524220a1a0 /storage
parent028eab234822ec7d51a20f8143057ab8f3f7bf9b (diff)
downloadmariadb-git-4555818f142b532875dcab073dac1168f284739b.tar.gz
Removed compiler warnings
Ensure that my_size_t is always unsigned (to get predictiable results from system to system) Removed some %lld, as these are not portable BUILD/FINISH.sh: Remove configure files from storage engines (as some of them may be old versions and may cause conflicts) client/mysqldump.c: Removed compiler warning client/mysqlslap.c: Removed compiler warning client/mysqltest.c: Removed compiler warning cmd-line-utils/readline/bind.c: Removed compiler warning cmd-line-utils/readline/histfile.c: Removed compiler warning include/my_global.h: Ensure that my_size_t is always unsigned (to get predictiable results from system to system) Moved my_offset_t here from parse_file.h sql/event_data_objects.cc: Removed compiler warning sql/event_scheduler.cc: Removed compiler warning sql/field.h: Removed compiler warning sql/ha_ndbcluster_binlog.cc: Removed compiler warning sql/ha_partition.cc: Removed compiler warning sql/item_strfunc.cc: Removed compiler warning sql/log_event.cc: Removed compiler warning sql/mysqld.cc: Removed compiler warning sql/parse_file.h: Moved my_offset_t to my_global.h sql/rpl_utility.cc: Removed compiler warning sql/sql_binlog.cc: Removed compiler warning sql/sql_cache.cc: Removed compiler warning sql/tztime.cc: Removed compiler warning storage/archive/ha_archive.cc: Removed compiler warning Removed %lld as it's not portable storage/heap/hp_write.c: Removed compiler warning storage/innobase/os/os0file.c: Removed compiler warning storage/myisam/myisampack.c: Removed compiler warning storage/myisammrg/myrg_rkey.c: Removed compiler warning storage/ndb/include/kernel/signaldata/DictTabInfo.hpp: Use my_offsetof instead of offsetof to get rid of compiler warnings storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp: Removed compiler warning storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp: Removed compiler warning Note: Someone from NDB team should check this fix! storage/ndb/src/kernel/vm/Rope.cpp: Removed compiler warning storage/ndb/src/mgmapi/mgmapi.cpp: Removed compiler warning storage/ndb/src/ndbapi/Ndb.cpp: Removed compiler warning storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp: Removed compiler warning storage/ndb/src/ndbapi/NdbScanOperation.cpp: Removed compiler warning storage/ndb/src/ndbapi/NdbTransaction.cpp: Removed compiler warning storage/ndb/src/ndbapi/Ndblist.cpp: Removed compiler warning
Diffstat (limited to 'storage')
-rw-r--r--storage/archive/ha_archive.cc26
-rw-r--r--storage/heap/hp_write.c2
-rw-r--r--storage/innobase/os/os0file.c2
-rw-r--r--storage/myisam/myisampack.c16
-rw-r--r--storage/myisammrg/myrg_rkey.c4
-rw-r--r--storage/ndb/include/kernel/signaldata/DictTabInfo.hpp20
-rw-r--r--storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp2
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp2
-rw-r--r--storage/ndb/src/kernel/vm/Rope.cpp14
-rw-r--r--storage/ndb/src/mgmapi/mgmapi.cpp6
-rw-r--r--storage/ndb/src/ndbapi/Ndb.cpp29
-rw-r--r--storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp6
-rw-r--r--storage/ndb/src/ndbapi/NdbScanOperation.cpp6
-rw-r--r--storage/ndb/src/ndbapi/NdbTransaction.cpp2
-rw-r--r--storage/ndb/src/ndbapi/Ndblist.cpp2
15 files changed, 72 insertions, 67 deletions
diff --git a/storage/archive/ha_archive.cc b/storage/archive/ha_archive.cc
index 172f0b524fb..f85c3fb4adf 100644
--- a/storage/archive/ha_archive.cc
+++ b/storage/archive/ha_archive.cc
@@ -329,10 +329,12 @@ int ha_archive::read_meta_file(File meta_file, ha_rows *rows,
DBUG_PRINT("ha_archive::read_meta_file", ("Check %d", (uint)meta_buffer[0]));
DBUG_PRINT("ha_archive::read_meta_file", ("Version %d", (uint)meta_buffer[1]));
- DBUG_PRINT("ha_archive::read_meta_file", ("Rows %llu", *rows));
- DBUG_PRINT("ha_archive::read_meta_file", ("Checkpoint %llu", check_point));
- DBUG_PRINT("ha_archive::read_meta_file", ("Auto-Increment %llu", *auto_increment));
- DBUG_PRINT("ha_archive::read_meta_file", ("Forced Flushes %llu", *forced_flushes));
+ DBUG_PRINT("ha_archive::read_meta_file", ("Rows %lu", (ulong) *rows));
+ DBUG_PRINT("ha_archive::read_meta_file", ("Checkpoint %lu", (ulong) check_point));
+ DBUG_PRINT("ha_archive::read_meta_file", ("Auto-Increment %lu",
+ (ulong) *auto_increment));
+ DBUG_PRINT("ha_archive::read_meta_file", ("Forced Flushes %lu",
+ (ulong) *forced_flushes));
DBUG_PRINT("ha_archive::read_meta_file", ("Real Path %s", real_path));
DBUG_PRINT("ha_archive::read_meta_file", ("Dirty %d", (int)(*ptr)));
@@ -385,12 +387,12 @@ int ha_archive::write_meta_file(File meta_file, ha_rows rows,
(uint)ARCHIVE_CHECK_HEADER));
DBUG_PRINT("ha_archive::write_meta_file", ("Version %d",
(uint)ARCHIVE_VERSION));
- DBUG_PRINT("ha_archive::write_meta_file", ("Rows %llu", (ulonglong)rows));
- DBUG_PRINT("ha_archive::write_meta_file", ("Checkpoint %llu", check_point));
- DBUG_PRINT("ha_archive::write_meta_file", ("Auto Increment %llu",
- auto_increment));
- DBUG_PRINT("ha_archive::write_meta_file", ("Forced Flushes %llu",
- forced_flushes));
+ DBUG_PRINT("ha_archive::write_meta_file", ("Rows %lu", (ulong) rows));
+ DBUG_PRINT("ha_archive::write_meta_file", ("Checkpoint %lu", (ulong) check_point));
+ DBUG_PRINT("ha_archive::write_meta_file", ("Auto Increment %lu",
+ (ulong) auto_increment));
+ DBUG_PRINT("ha_archive::write_meta_file", ("Forced Flushes %lu",
+ (ulong) forced_flushes));
DBUG_PRINT("ha_archive::write_meta_file", ("Real path %s",
real_path));
DBUG_PRINT("ha_archive::write_meta_file", ("Dirty %d", (uint)dirty));
@@ -1057,7 +1059,7 @@ int ha_archive::rnd_init(bool scan)
if (scan)
{
scan_rows= share->rows_recorded;
- DBUG_PRINT("info", ("archive will retrieve %llu rows", scan_rows));
+ DBUG_PRINT("info", ("archive will retrieve %lu rows", (ulong) scan_rows));
stats.records= 0;
/*
@@ -1318,7 +1320,7 @@ int ha_archive::optimize(THD* thd, HA_CHECK_OPT* check_opt)
share->rows_recorded++;
}
}
- DBUG_PRINT("info", ("recovered %llu archive rows", share->rows_recorded));
+ DBUG_PRINT("info", ("recovered %lu archive rows", (ulong) share->rows_recorded));
my_free((char*)buf, MYF(0));
if (rc && rc != HA_ERR_END_OF_FILE)
diff --git a/storage/heap/hp_write.c b/storage/heap/hp_write.c
index 16f02999c93..c83ae65c966 100644
--- a/storage/heap/hp_write.c
+++ b/storage/heap/hp_write.c
@@ -68,7 +68,7 @@ int heap_write(HP_INFO *info, const byte *record)
DBUG_RETURN(0);
err:
- DBUG_PRINT("info",("Duplicate key: %d", keydef - share->keydef));
+ DBUG_PRINT("info",("Duplicate key: %d", (int) (keydef - share->keydef)));
info->errkey= keydef - share->keydef;
if (keydef->algorithm == HA_KEY_ALG_BTREE)
{
diff --git a/storage/innobase/os/os0file.c b/storage/innobase/os/os0file.c
index a4acb0cd485..c4d051ec771 100644
--- a/storage/innobase/os/os0file.c
+++ b/storage/innobase/os/os0file.c
@@ -1733,7 +1733,7 @@ os_file_set_size(
}
/* Print about progress for each 100 MB written */
- if ((current_size + n_bytes) / (ib_longlong)(100 * 1024 * 1024)
+ if ((ib_longlong) (current_size + n_bytes) / (ib_longlong)(100 * 1024 * 1024)
!= current_size / (ib_longlong)(100 * 1024 * 1024)) {
fprintf(stderr, " %lu00",
diff --git a/storage/myisam/myisampack.c b/storage/myisam/myisampack.c
index 810c12327a0..98121cc6d90 100644
--- a/storage/myisam/myisampack.c
+++ b/storage/myisam/myisampack.c
@@ -1105,18 +1105,18 @@ static int get_statistic(PACK_MRG_INFO *mrg,HUFF_COUNTS *huff_counts)
my_off_t total_count;
char llbuf[32];
- DBUG_PRINT("info", ("column: %3u", count - huff_counts + 1));
+ DBUG_PRINT("info", ("column: %3u", (uint) (count - huff_counts) + 1));
if (verbose >= 2)
- VOID(printf("column: %3u\n", count - huff_counts + 1));
+ VOID(printf("column: %3u\n", (uint) (count - huff_counts) + 1));
if (count->tree_buff)
{
DBUG_PRINT("info", ("number of distinct values: %u",
- (count->tree_pos - count->tree_buff) /
- count->field_length));
+ (uint) ((count->tree_pos - count->tree_buff) /
+ count->field_length)));
if (verbose >= 2)
VOID(printf("number of distinct values: %u\n",
- (count->tree_pos - count->tree_buff) /
- count->field_length));
+ (uint) ((count->tree_pos - count->tree_buff) /
+ count->field_length)));
}
total_count= 0;
for (idx= 0; idx < 256; idx++)
@@ -2279,8 +2279,8 @@ static my_off_t write_huff_tree(HUFF_TREE *huff_tree, uint trees)
if (bits > 8 * sizeof(code))
{
VOID(fflush(stdout));
- VOID(fprintf(stderr, "error: Huffman code too long: %u/%u\n",
- bits, 8 * sizeof(code)));
+ VOID(fprintf(stderr, "error: Huffman code too long: %u/%lu\n",
+ bits, (ulong) (8 * sizeof(code))));
errors++;
break;
}
diff --git a/storage/myisammrg/myrg_rkey.c b/storage/myisammrg/myrg_rkey.c
index f87b264081e..8d3c0a4699a 100644
--- a/storage/myisammrg/myrg_rkey.c
+++ b/storage/myisammrg/myrg_rkey.c
@@ -87,8 +87,8 @@ int myrg_rkey(MYRG_INFO *info,byte *buf,int inx, const byte *key,
mi=(info->current_table=(MYRG_TABLE *)queue_top(&(info->by_key)))->table;
mi->once_flags|= RRND_PRESERVE_LASTINX;
- DBUG_PRINT("info", ("using table no: %d",
- info->current_table - info->open_tables + 1));
+ DBUG_PRINT("info", ("using table no: %u",
+ (uint) (info->current_table - info->open_tables) + 1));
DBUG_DUMP("result key", (byte*) mi->lastkey, mi->lastkey_length);
DBUG_RETURN(_myrg_mi_read_record(mi,buf));
}
diff --git a/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp b/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp
index 86186929394..6e76840fc5f 100644
--- a/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp
+++ b/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp
@@ -47,17 +47,17 @@ inline int my_decimal_get_binary_size(uint precision, uint scale)
#endif
#define DTIMAP(x, y, z) \
- { DictTabInfo::y, offsetof(x, z), SimpleProperties::Uint32Value, 0, (~0), 0 }
+ { DictTabInfo::y, my_offsetof(x, z), SimpleProperties::Uint32Value, 0, (~0), 0 }
#define DTIMAP2(x, y, z, u, v) \
- { DictTabInfo::y, offsetof(x, z), SimpleProperties::Uint32Value, u, v, 0 }
+ { DictTabInfo::y, my_offsetof(x, z), SimpleProperties::Uint32Value, u, v, 0 }
#define DTIMAPS(x, y, z, u, v) \
- { DictTabInfo::y, offsetof(x, z), SimpleProperties::StringValue, u, v, 0 }
+ { DictTabInfo::y, my_offsetof(x, z), SimpleProperties::StringValue, u, v, 0 }
#define DTIMAPB(x, y, z, u, v, l) \
- { DictTabInfo::y, offsetof(x, z), SimpleProperties::BinaryValue, u, v, \
- offsetof(x, l) }
+ { DictTabInfo::y, my_offsetof(x, z), SimpleProperties::BinaryValue, u, v, \
+ my_offsetof(x, l) }
#define DTIBREAK(x) \
{ DictTabInfo::x, 0, SimpleProperties::InvalidValue, 0, 0, 0 }
@@ -602,17 +602,17 @@ public:
};
#define DFGIMAP(x, y, z) \
- { DictFilegroupInfo::y, offsetof(x, z), SimpleProperties::Uint32Value, 0, (~0), 0 }
+ { DictFilegroupInfo::y, my_offsetof(x, z), SimpleProperties::Uint32Value, 0, (~0), 0 }
#define DFGIMAP2(x, y, z, u, v) \
- { DictFilegroupInfo::y, offsetof(x, z), SimpleProperties::Uint32Value, u, v, 0 }
+ { DictFilegroupInfo::y, my_offsetof(x, z), SimpleProperties::Uint32Value, u, v, 0 }
#define DFGIMAPS(x, y, z, u, v) \
- { DictFilegroupInfo::y, offsetof(x, z), SimpleProperties::StringValue, u, v, 0 }
+ { DictFilegroupInfo::y, my_offsetof(x, z), SimpleProperties::StringValue, u, v, 0 }
#define DFGIMAPB(x, y, z, u, v, l) \
- { DictFilegroupInfo::y, offsetof(x, z), SimpleProperties::BinaryValue, u, v, \
- offsetof(x, l) }
+ { DictFilegroupInfo::y, my_offsetof(x, z), SimpleProperties::BinaryValue, u, v, \
+ my_offsetof(x, l) }
#define DFGIBREAK(x) \
{ DictFilegroupInfo::x, 0, SimpleProperties::InvalidValue, 0, 0, 0 }
diff --git a/storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp b/storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp
index d3a4e72c3f0..9c66636980a 100644
--- a/storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp
+++ b/storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp
@@ -68,7 +68,7 @@ print_head(const char * filename, const SchemaFile * sf)
if (! checkonly) {
ndbout << "----- Schemafile: " << filename << " -----" << endl;
ndbout_c("Magic: %.*s ByteOrder: %.8x NdbVersion: %s FileSize: %d",
- sizeof(sf->Magic),
+ (int) sizeof(sf->Magic),
sf->Magic,
sf->ByteOrder,
version(sf->NdbVersion),
diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
index 677eff53559..5d4115c1d2d 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
@@ -1066,6 +1066,7 @@ Dbtup::updateVarSizeNotNULL(Uint32* in_buffer,
terrorCode= ZAI_INCONSISTENCY_ERROR;
return false;
}
+ return false;
}
bool
@@ -1485,6 +1486,7 @@ Dbtup::updateDiskVarSizeNotNULL(Uint32* in_buffer,
terrorCode= ZAI_INCONSISTENCY_ERROR;
return false;
}
+ return false;
}
bool
diff --git a/storage/ndb/src/kernel/vm/Rope.cpp b/storage/ndb/src/kernel/vm/Rope.cpp
index 0c90d8f65d5..b6bce864caf 100644
--- a/storage/ndb/src/kernel/vm/Rope.cpp
+++ b/storage/ndb/src/kernel/vm/Rope.cpp
@@ -30,8 +30,8 @@ ConstRope::copy(char* buf) const {
int
ConstRope::compare(const char * str, size_t len) const {
if(DEBUG_ROPE)
- ndbout_c("ConstRope[ %d 0x%x 0x%x ]::compare(%s, %d)",
- head.used, head.firstItem, head.lastItem, str, len);
+ ndbout_c("ConstRope[ %d 0x%x 0x%x ]::compare(%s, %d)",
+ head.used, head.firstItem, head.lastItem, str, (int) len);
Uint32 left = head.used > len ? len : head.used;
Ptr<Segment> curr;
curr.i = head.firstItem;
@@ -60,7 +60,7 @@ ConstRope::compare(const char * str, size_t len) const {
}
}
if(DEBUG_ROPE)
- ndbout_c("ConstRope::compare(%s, %d) -> %d", str, len, head.used > len);
+ ndbout_c("ConstRope::compare(%s, %d) -> %d", str, (int) len, head.used > len);
return head.used > len;
}
@@ -91,7 +91,7 @@ Rope::copy(char* buf) const {
int
Rope::compare(const char * str, size_t len) const {
if(DEBUG_ROPE)
- ndbout_c("Rope::compare(%s, %d)", str, len);
+ ndbout_c("Rope::compare(%s, %d)", str, (int) len);
Uint32 left = head.used > len ? len : head.used;
Ptr<Segment> curr;
curr.i = head.firstItem;
@@ -100,7 +100,7 @@ Rope::compare(const char * str, size_t len) const {
int res = memcmp(str, (const char*)curr.p->data, 4 * getSegmentSize());
if(res != 0){
if(DEBUG_ROPE)
- ndbout_c("Rope::compare(%s, %d, %s) -> %d", str, len,
+ ndbout_c("Rope::compare(%s, %d, %s) -> %d", str, (int) len,
(const char*)curr.p->data, res);
return res;
}
@@ -120,14 +120,14 @@ Rope::compare(const char * str, size_t len) const {
}
}
if(DEBUG_ROPE)
- ndbout_c("Rope::compare(%s, %d) -> %d", str, len, head.used > len);
+ ndbout_c("Rope::compare(%s, %d) -> %d", str, (int) len, head.used > len);
return head.used > len;
}
bool
Rope::assign(const char * s, size_t len, Uint32 hash){
if(DEBUG_ROPE)
- ndbout_c("Rope::assign(%s, %d, 0x%x)", s, len, hash);
+ ndbout_c("Rope::assign(%s, %d, 0x%x)", s, (int) len, hash);
m_hash = hash;
head.used = (head.used + 3) / 4;
release();
diff --git a/storage/ndb/src/mgmapi/mgmapi.cpp b/storage/ndb/src/mgmapi/mgmapi.cpp
index 90a863402e8..b64b24aa3cf 100644
--- a/storage/ndb/src/mgmapi/mgmapi.cpp
+++ b/storage/ndb/src/mgmapi/mgmapi.cpp
@@ -184,7 +184,7 @@ ndb_mgm_create_handle()
h->mgmd_version_minor= -1;
h->mgmd_version_build= -1;
- DBUG_PRINT("info", ("handle=0x%x", (UintPtr)h));
+ DBUG_PRINT("info", ("handle: 0x%lx", (ulong) h));
DBUG_RETURN(h);
}
@@ -201,7 +201,7 @@ int
ndb_mgm_set_connectstring(NdbMgmHandle handle, const char * mgmsrv)
{
DBUG_ENTER("ndb_mgm_set_connectstring");
- DBUG_PRINT("info", ("handle=0x%x", (UintPtr)handle));
+ DBUG_PRINT("info", ("handle: 0x%lx", (ulong) handle));
handle->cfg.~LocalConfig();
new (&(handle->cfg)) LocalConfig;
if (!handle->cfg.init(mgmsrv, 0) ||
@@ -243,7 +243,7 @@ ndb_mgm_destroy_handle(NdbMgmHandle * handle)
DBUG_ENTER("ndb_mgm_destroy_handle");
if(!handle)
DBUG_VOID_RETURN;
- DBUG_PRINT("info", ("handle=0x%x", (UintPtr)(* handle)));
+ DBUG_PRINT("info", ("handle: 0x%lx", (ulong) (* handle)));
/**
* important! only disconnect if connected
* other code relies on this
diff --git a/storage/ndb/src/ndbapi/Ndb.cpp b/storage/ndb/src/ndbapi/Ndb.cpp
index 843cb7668e6..ca5fd07d724 100644
--- a/storage/ndb/src/ndbapi/Ndb.cpp
+++ b/storage/ndb/src/ndbapi/Ndb.cpp
@@ -768,7 +768,7 @@ Ndb::getAutoIncrementValue(const char* aTableName,
TupleIdRange & range = info->m_tuple_id_range;
if (getTupleIdFromNdb(table, range, tupleId, cacheSize) == -1)
DBUG_RETURN(-1);
- DBUG_PRINT("info", ("value %llu", (ulonglong)tupleId));
+ DBUG_PRINT("info", ("value %lu", (ulong) tupleId));
DBUG_RETURN(0);
}
@@ -791,7 +791,7 @@ Ndb::getAutoIncrementValue(const NdbDictionary::Table * aTable,
TupleIdRange & range = info->m_tuple_id_range;
if (getTupleIdFromNdb(table, range, tupleId, cacheSize) == -1)
DBUG_RETURN(-1);
- DBUG_PRINT("info", ("value %llu", (ulonglong)tupleId));
+ DBUG_PRINT("info", ("value %lu", (ulong)tupleId));
DBUG_RETURN(0);
}
@@ -806,7 +806,7 @@ Ndb::getAutoIncrementValue(const NdbDictionary::Table * aTable,
if (getTupleIdFromNdb(table, range, tupleId, cacheSize) == -1)
DBUG_RETURN(-1);
- DBUG_PRINT("info", ("value %llu", (ulonglong)tupleId));
+ DBUG_PRINT("info", ("value %lu", (ulong)tupleId));
DBUG_RETURN(0);
}
@@ -819,7 +819,7 @@ Ndb::getTupleIdFromNdb(const NdbTableImpl* table,
{
assert(range.m_first_tuple_id < range.m_last_tuple_id);
tupleId = ++range.m_first_tuple_id;
- DBUG_PRINT("info", ("next cached value %llu", (ulonglong)tupleId));
+ DBUG_PRINT("info", ("next cached value %lu", (ulong)tupleId));
}
else
{
@@ -856,7 +856,7 @@ Ndb::readAutoIncrementValue(const char* aTableName,
TupleIdRange & range = info->m_tuple_id_range;
if (readTupleIdFromNdb(table, range, tupleId) == -1)
DBUG_RETURN(-1);
- DBUG_PRINT("info", ("value %llu", (ulonglong)tupleId));
+ DBUG_PRINT("info", ("value %lu", (ulong)tupleId));
DBUG_RETURN(0);
}
@@ -879,7 +879,7 @@ Ndb::readAutoIncrementValue(const NdbDictionary::Table * aTable,
TupleIdRange & range = info->m_tuple_id_range;
if (readTupleIdFromNdb(table, range, tupleId) == -1)
DBUG_RETURN(-1);
- DBUG_PRINT("info", ("value %llu", (ulonglong)tupleId));
+ DBUG_PRINT("info", ("value %lu", (ulong)tupleId));
DBUG_RETURN(0);
}
@@ -893,7 +893,7 @@ Ndb::readAutoIncrementValue(const NdbDictionary::Table * aTable,
if (readTupleIdFromNdb(table, range, tupleId) == -1)
DBUG_RETURN(-1);
- DBUG_PRINT("info", ("value %llu", (ulonglong)tupleId));
+ DBUG_PRINT("info", ("value %lu", (ulong)tupleId));
DBUG_RETURN(0);
}
@@ -994,8 +994,8 @@ Ndb::setTupleIdInNdb(const NdbTableImpl* table,
{
range.m_first_tuple_id = tupleId - 1;
DBUG_PRINT("info",
- ("Setting next auto increment cached value to %llu",
- (ulonglong)tupleId));
+ ("Setting next auto increment cached value to %lu",
+ (ulong)tupleId));
DBUG_RETURN(0);
}
}
@@ -1049,7 +1049,8 @@ Ndb::opTupleIdOnNdb(const NdbTableImpl* table,
{
DBUG_ENTER("Ndb::opTupleIdOnNdb");
Uint32 aTableId = table->m_id;
- DBUG_PRINT("enter", ("table=%u value=%llu op=%u", aTableId, opValue, op));
+ DBUG_PRINT("enter", ("table: %u value: %lu op: %u",
+ aTableId, (ulong) opValue, op));
NdbTransaction* tConnection = NULL;
NdbOperation* tOperation = NULL;
@@ -1117,8 +1118,8 @@ Ndb::opTupleIdOnNdb(const NdbTableImpl* table,
else
{
DBUG_PRINT("info",
- ("Setting next auto increment value (db) to %llu",
- (ulonglong)opValue));
+ ("Setting next auto increment value (db) to %lu",
+ (ulong) opValue));
range.m_first_tuple_id = range.m_last_tuple_id = opValue - 1;
}
break;
@@ -1244,9 +1245,9 @@ int Ndb::setDatabaseAndSchemaName(const NdbDictionary::Table* t)
if (s2 && s2 != s1 + 1) {
char buf[NAME_LEN + 1];
if (s1 - s0 <= NAME_LEN && s2 - (s1 + 1) <= NAME_LEN) {
- sprintf(buf, "%.*s", s1 - s0, s0);
+ sprintf(buf, "%.*s", (int) (s1 - s0), s0);
setDatabaseName(buf);
- sprintf(buf, "%.*s", s2 - (s1 + 1), s1 + 1);
+ sprintf(buf, "%.*s", (int) (s2 - (s1 + 1)), s1 + 1);
setDatabaseSchemaName(buf);
return 0;
}
diff --git a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
index 0b12b9d2f0f..1996dec024a 100644
--- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
+++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
@@ -1508,9 +1508,9 @@ NdbEventBuffer::execSUB_GCP_COMPLETE_REP(const SubGcpCompleteRep * const rep)
else
{
/** out of order something */
- ndbout_c("out of order bucket: %d gci: %lld m_latestGCI: %lld",
- bucket-(Gci_container*)m_active_gci.getBase(),
- gci, m_latestGCI);
+ ndbout_c("out of order bucket: %d gci: %ld m_latestGCI: %ld",
+ (int) (bucket-(Gci_container*)m_active_gci.getBase()),
+ (long) gci, (long) m_latestGCI);
bucket->m_state = Gci_container::GC_COMPLETE;
bucket->m_gcp_complete_rep_count = 1; // Prevent from being reused
m_latest_complete_GCI = gci;
diff --git a/storage/ndb/src/ndbapi/NdbScanOperation.cpp b/storage/ndb/src/ndbapi/NdbScanOperation.cpp
index 64dc544b226..3e2081b6018 100644
--- a/storage/ndb/src/ndbapi/NdbScanOperation.cpp
+++ b/storage/ndb/src/ndbapi/NdbScanOperation.cpp
@@ -669,9 +669,9 @@ NdbScanOperation::doSend(int ProcessorId)
void NdbScanOperation::close(bool forceSend, bool releaseOp)
{
DBUG_ENTER("NdbScanOperation::close");
- DBUG_PRINT("enter", ("this=%x tcon=%x con=%x force=%d release=%d",
- (UintPtr)this,
- (UintPtr)m_transConnection, (UintPtr)theNdbCon,
+ DBUG_PRINT("enter", ("this: 0x%lx tcon: 0x%lx con: 0x%lx force: %d release: %d",
+ (long) this,
+ (long) m_transConnection, (long) theNdbCon,
forceSend, releaseOp));
if(m_transConnection){
diff --git a/storage/ndb/src/ndbapi/NdbTransaction.cpp b/storage/ndb/src/ndbapi/NdbTransaction.cpp
index 4d7a6a59371..0c59746c1e9 100644
--- a/storage/ndb/src/ndbapi/NdbTransaction.cpp
+++ b/storage/ndb/src/ndbapi/NdbTransaction.cpp
@@ -1010,7 +1010,7 @@ void
NdbTransaction::releaseExecutedScanOperation(NdbIndexScanOperation* cursorOp)
{
DBUG_ENTER("NdbTransaction::releaseExecutedScanOperation");
- DBUG_PRINT("enter", ("this=0x%x op=0x%x", (UintPtr)this, (UintPtr)cursorOp));
+ DBUG_PRINT("enter", ("this: 0x%lx op: 0x%lx", (ulong) this, (ulong) cursorOp));
releaseScanOperation(&m_firstExecutedScanOp, 0, cursorOp);
diff --git a/storage/ndb/src/ndbapi/Ndblist.cpp b/storage/ndb/src/ndbapi/Ndblist.cpp
index f82348fc91d..a0d22466db4 100644
--- a/storage/ndb/src/ndbapi/Ndblist.cpp
+++ b/storage/ndb/src/ndbapi/Ndblist.cpp
@@ -361,7 +361,7 @@ void
Ndb::releaseScanOperation(NdbIndexScanOperation* aScanOperation)
{
DBUG_ENTER("Ndb::releaseScanOperation");
- DBUG_PRINT("enter", ("op=%x", (UintPtr)aScanOperation));
+ DBUG_PRINT("enter", ("op: 0x%lx", (ulong) aScanOperation));
#ifdef ndb_release_check_dup
{ NdbIndexScanOperation* tOp = theScanOpIdleList;
while (tOp != NULL) {