diff options
author | monty@mysql.com/narttu.mysql.fi <> | 2006-11-30 21:56:03 +0200 |
---|---|---|
committer | monty@mysql.com/narttu.mysql.fi <> | 2006-11-30 21:56:03 +0200 |
commit | 601e6f4b2a78921304bc1d779991c615ee229f89 (patch) | |
tree | 0a9f9390874c91b9e4430fecfbbffa72967e7b69 /ndb/src | |
parent | 3d4095603952aca95892d55fb1ef435132de1197 (diff) | |
download | mariadb-git-601e6f4b2a78921304bc1d779991c615ee229f89.tar.gz |
Fixed compiler warnings
Don't assert if my_thread_end() is called twice (common case)
Diffstat (limited to 'ndb/src')
-rw-r--r-- | ndb/src/mgmapi/mgmapi.cpp | 6 | ||||
-rw-r--r-- | ndb/src/ndbapi/Ndb.cpp | 23 | ||||
-rw-r--r-- | ndb/src/ndbapi/NdbScanOperation.cpp | 6 | ||||
-rw-r--r-- | ndb/src/ndbapi/NdbTransaction.cpp | 3 | ||||
-rw-r--r-- | ndb/src/ndbapi/Ndblist.cpp | 2 |
5 files changed, 21 insertions, 19 deletions
diff --git a/ndb/src/mgmapi/mgmapi.cpp b/ndb/src/mgmapi/mgmapi.cpp index df69684784a..8aa4f7213de 100644 --- a/ndb/src/mgmapi/mgmapi.cpp +++ b/ndb/src/mgmapi/mgmapi.cpp @@ -178,7 +178,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", (long)h)); DBUG_RETURN(h); } @@ -195,7 +195,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", (long)handle)); handle->cfg.~LocalConfig(); new (&(handle->cfg)) LocalConfig; if (!handle->cfg.init(mgmsrv, 0) || @@ -237,7 +237,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", (long)(* handle))); /** * important! only disconnect if connected * other code relies on this diff --git a/ndb/src/ndbapi/Ndb.cpp b/ndb/src/ndbapi/Ndb.cpp index c701fbf77e0..59a204be2a8 100644 --- a/ndb/src/ndbapi/Ndb.cpp +++ b/ndb/src/ndbapi/Ndb.cpp @@ -777,7 +777,7 @@ Ndb::getAutoIncrementValue(const char* aTableName, } if (getTupleIdFromNdb(info, tupleId, cacheSize) == -1) DBUG_RETURN(-1); - DBUG_PRINT("info", ("value %llu", (ulonglong)tupleId)); + DBUG_PRINT("info", ("value %lu", (ulong) tupleId)); DBUG_RETURN(0); } @@ -798,7 +798,7 @@ Ndb::getAutoIncrementValue(const NdbDictionary::Table * aTable, } if (getTupleIdFromNdb(info, tupleId, cacheSize) == -1) DBUG_RETURN(-1); - DBUG_PRINT("info", ("value %llu", (ulonglong)tupleId)); + DBUG_PRINT("info", ("value %lu", (ulong)tupleId)); DBUG_RETURN(0); } @@ -811,7 +811,7 @@ Ndb::getTupleIdFromNdb(Ndb_local_table_info* info, { assert(info->m_first_tuple_id < info->m_last_tuple_id); tupleId = ++info->m_first_tuple_id; - DBUG_PRINT("info", ("next cached value %llu", (ulonglong)tupleId)); + DBUG_PRINT("info", ("next cached value %lu", (ulong)tupleId)); } else { @@ -845,7 +845,7 @@ Ndb::readAutoIncrementValue(const char* aTableName, } if (readTupleIdFromNdb(info, tupleId) == -1) DBUG_RETURN(-1); - DBUG_PRINT("info", ("value %llu", (ulonglong)tupleId)); + DBUG_PRINT("info", ("value %lu", (ulong)tupleId)); DBUG_RETURN(0); } @@ -866,7 +866,7 @@ Ndb::readAutoIncrementValue(const NdbDictionary::Table * aTable, } if (readTupleIdFromNdb(info, tupleId) == -1) DBUG_RETURN(-1); - DBUG_PRINT("info", ("value %llu", (ulonglong)tupleId)); + DBUG_PRINT("info", ("value %lu", (ulong)tupleId)); DBUG_RETURN(0); } @@ -948,8 +948,8 @@ Ndb::setTupleIdInNdb(Ndb_local_table_info* info, { info->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); } } @@ -976,7 +976,8 @@ Ndb::opTupleIdOnNdb(Ndb_local_table_info* info, Uint64 & opValue, Uint32 op) { DBUG_ENTER("Ndb::opTupleIdOnNdb"); Uint32 aTableId = info->m_table_impl->m_tableId; - 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; NdbOperation* tOperation= 0; // Compiler warning if not initialized @@ -1050,8 +1051,8 @@ Ndb::opTupleIdOnNdb(Ndb_local_table_info* info, Uint64 & opValue, Uint32 op) else { DBUG_PRINT("info", - ("Setting next auto increment value (db) to %llu", - (ulonglong)opValue)); + ("Setting next auto increment value (db) to %lu", + (ulong)opValue)); info->m_first_tuple_id = info->m_last_tuple_id = opValue - 1; } break; @@ -1247,7 +1248,7 @@ Ndb::internalize_index_name(const NdbTableImpl * table, if (!table) { DBUG_PRINT("error", ("!table")); - return ret; + DBUG_RETURN(ret); } if (fullyQualifiedNames) diff --git a/ndb/src/ndbapi/NdbScanOperation.cpp b/ndb/src/ndbapi/NdbScanOperation.cpp index a0322f09256..92a1e476b45 100644 --- a/ndb/src/ndbapi/NdbScanOperation.cpp +++ b/ndb/src/ndbapi/NdbScanOperation.cpp @@ -653,9 +653,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/ndb/src/ndbapi/NdbTransaction.cpp b/ndb/src/ndbapi/NdbTransaction.cpp index 86dc92a86c1..36b1217c101 100644 --- a/ndb/src/ndbapi/NdbTransaction.cpp +++ b/ndb/src/ndbapi/NdbTransaction.cpp @@ -1007,7 +1007,8 @@ 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", + (long)this, (long)cursorOp)); releaseScanOperation(&m_firstExecutedScanOp, 0, cursorOp); diff --git a/ndb/src/ndbapi/Ndblist.cpp b/ndb/src/ndbapi/Ndblist.cpp index f82348fc91d..00ab4599fdf 100644 --- a/ndb/src/ndbapi/Ndblist.cpp +++ b/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", (long)aScanOperation)); #ifdef ndb_release_check_dup { NdbIndexScanOperation* tOp = theScanOpIdleList; while (tOp != NULL) { |