diff options
author | unknown <tomas@mc05.(none)> | 2004-05-12 06:26:53 +0200 |
---|---|---|
committer | unknown <tomas@mc05.(none)> | 2004-05-12 06:26:53 +0200 |
commit | 5a6ab9bd0d05ce96e61893254724c0d7575d0bca (patch) | |
tree | 79f6061eea1ca47172e5fc879f2b023a05313dd3 | |
parent | c2ce702b3bfff6faa25c6e2b145e41394d544d8d (diff) | |
parent | efe5a75d7d8cc42b387e68d74359def0d8ea4f20 (diff) | |
download | mariadb-git-5a6ab9bd0d05ce96e61893254724c0d7575d0bca.tar.gz |
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1-ndb
into mc05.(none):/space2/tomas/mysql-4.1
ndb/include/newtonapi/defs/pcn_types.h:
Auto merged
ndb/src/common/mgmcommon/ConfigRetriever.cpp:
Auto merged
ndb/src/common/portlib/memtest/munmaptest/munmaptest.cpp:
Auto merged
ndb/src/common/portlib/unix/NdbCondition.c:
Auto merged
ndb/src/common/portlib/unix/NdbDaemon.c:
Auto merged
ndb/src/common/util/File.cpp:
Auto merged
ndb/src/common/util/getarg.c:
Auto merged
ndb/src/common/util/strlcat.c:
Auto merged
ndb/src/common/util/strlcpy.c:
Auto merged
ndb/src/cw/cpcd/Process.cpp:
Auto merged
ndb/src/kernel/blocks/dbdict/printSchemafile/printSchemafile.cpp:
Auto merged
ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp:
Auto merged
ndb/src/kernel/ndb-main/Main.cpp:
Auto merged
ndb/test/ndbapi/flexBench/flexBench.cpp:
Auto merged
ndb/test/src/HugoCalculator.cpp:
Auto merged
ndb/test/src/NDBT_ResultRow.cpp:
Auto merged
ndb/test/src/NdbBackup.cpp:
Auto merged
ndb/test/src/NdbConfig.cpp:
Auto merged
ndb/test/src/NdbRestarter.cpp:
Auto merged
ndb/tools/cpcc/cpcc.cpp:
Auto merged
31 files changed, 58 insertions, 84 deletions
diff --git a/ndb/include/newtonapi/defs/pcn_types.h b/ndb/include/newtonapi/defs/pcn_types.h index 1c5de22e518..eae6c67899d 100644 --- a/ndb/include/newtonapi/defs/pcn_types.h +++ b/ndb/include/newtonapi/defs/pcn_types.h @@ -19,13 +19,7 @@ #include <ndb_global.h> -#ifdef NDB_MACOSX -typedef unsigned int Size_t; -#elif defined(NDB_SPARC_64) -typedef unsigned int Size_t; -#else typedef size_t Size_t; -#endif typedef int Boolean_t; diff --git a/ndb/include/portlib/NdbMutex.h b/ndb/include/portlib/NdbMutex.h index d2cb6328b03..9ca2bae8ce1 100644 --- a/ndb/include/portlib/NdbMutex.h +++ b/ndb/include/portlib/NdbMutex.h @@ -17,6 +17,8 @@ #ifndef NDB_MUTEX_H #define NDB_MUTEX_H +#include <ndb_global.h> + #ifdef NDB_WIN32 #include <winsock2.h> #include <ws2tcpip.h> @@ -34,7 +36,7 @@ typedef SEMAPHORE NdbMutex; #elif defined NDB_WIN32 typedef CRITICAL_SECTION NdbMutex; #else -#include <pthread.h> +#include <my_pthread.h> typedef pthread_mutex_t NdbMutex; #define NDB_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER #endif diff --git a/ndb/src/common/editline/editline.c b/ndb/src/common/editline/editline.c index 0529d18b952..1e4c1ecba76 100644 --- a/ndb/src/common/editline/editline.c +++ b/ndb/src/common/editline/editline.c @@ -19,10 +19,10 @@ ** ** Main editing routines for editline library. */ +#include <ndb_global.h> + #include "editline_internal.h" #include <signal.h> -#include <ctype.h> -#include <unistd.h> /* ** Manifest constants. diff --git a/ndb/src/common/mgmcommon/ConfigRetriever.cpp b/ndb/src/common/mgmcommon/ConfigRetriever.cpp index ef6861ef291..04dc5466bbc 100644 --- a/ndb/src/common/mgmcommon/ConfigRetriever.cpp +++ b/ndb/src/common/mgmcommon/ConfigRetriever.cpp @@ -16,7 +16,6 @@ #include <ndb_global.h> #include <ndb_version.h> -#include <sys/stat.h> #include <ConfigRetriever.hpp> diff --git a/ndb/src/common/portlib/memtest/munmaptest/munmaptest.cpp b/ndb/src/common/portlib/memtest/munmaptest/munmaptest.cpp index f5d0c6a0a4c..b1d84131810 100644 --- a/ndb/src/common/portlib/memtest/munmaptest/munmaptest.cpp +++ b/ndb/src/common/portlib/memtest/munmaptest/munmaptest.cpp @@ -18,7 +18,6 @@ #include <ndb_global.h> -#include <sys/mman.h> #include <NdbOut.hpp> #include <NdbThread.h> diff --git a/ndb/src/common/portlib/unix/NdbCondition.c b/ndb/src/common/portlib/unix/NdbCondition.c index 9615e107d0c..1d229bdcdef 100644 --- a/ndb/src/common/portlib/unix/NdbCondition.c +++ b/ndb/src/common/portlib/unix/NdbCondition.c @@ -61,7 +61,6 @@ NdbCondition_Wait(struct NdbCondition* p_cond, return result; } -#include <time.h> int NdbCondition_WaitTimeout(struct NdbCondition* p_cond, NdbMutex* p_mutex, diff --git a/ndb/src/common/portlib/unix/NdbDaemon.c b/ndb/src/common/portlib/unix/NdbDaemon.c index fbe684598f2..6eb319e1fcf 100644 --- a/ndb/src/common/portlib/unix/NdbDaemon.c +++ b/ndb/src/common/portlib/unix/NdbDaemon.c @@ -19,15 +19,13 @@ #define NdbDaemon_ErrorSize 500 #if defined(NDB_LINUX) || defined(NDB_SOLARIS) + /* XXX fix other unixes */ long NdbDaemon_DaemonPid; int NdbDaemon_ErrorCode; char NdbDaemon_ErrorText[NdbDaemon_ErrorSize]; -#endif int NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags) { - /* XXX fix other unixes */ -#if defined(NDB_LINUX) || defined(NDB_SOLARIS) int lockfd = -1, logfd = -1, n; char buf[64]; @@ -129,10 +127,19 @@ NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags) dup2(logfd, 2); close(logfd); } -#endif /* Success */ return 0; } +#else +int +NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags) +{ + /* Fail */ + snprintf(NdbDaemon_ErrorText, NdbDaemon_ErrorSize, + "Daemon mode not implemented"); + return -1; +} +#endif #ifdef NDB_DAEMON_TEST diff --git a/ndb/src/common/portlib/unix/NdbHost.c b/ndb/src/common/portlib/unix/NdbHost.c index 8d2a23fccda..4749bb39ea7 100644 --- a/ndb/src/common/portlib/unix/NdbHost.c +++ b/ndb/src/common/portlib/unix/NdbHost.c @@ -15,8 +15,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> #include "NdbHost.h" -#include <unistd.h> int NdbHost_GetHostName(char* buf) { diff --git a/ndb/src/common/util/File.cpp b/ndb/src/common/util/File.cpp index ccd6ba24916..22d262a0d27 100644 --- a/ndb/src/common/util/File.cpp +++ b/ndb/src/common/util/File.cpp @@ -14,13 +14,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <File.hpp> - -#include <sys/stat.h> +#include <ndb_global.h> -#if defined NDB_OSE || defined NDB_SOFTOSE -#include <unistd.h> -#endif +#include <File.hpp> #include <NdbOut.hpp> diff --git a/ndb/src/common/util/getarg.c b/ndb/src/common/util/getarg.c index 136965ad89c..ae016746987 100644 --- a/ndb/src/common/util/getarg.c +++ b/ndb/src/common/util/getarg.c @@ -34,8 +34,6 @@ #include <ndb_global.h> -#include <time.h> -#include <ctype.h> #include "getarg.h" #define ISFLAG(X) ((X).type == arg_flag || (X).type == arg_negative_flag) diff --git a/ndb/src/common/util/strlcat.c b/ndb/src/common/util/strlcat.c index 3da47dee6f5..aa282abe48d 100644 --- a/ndb/src/common/util/strlcat.c +++ b/ndb/src/common/util/strlcat.c @@ -32,7 +32,6 @@ */ #include <ndb_global.h> -#include <ndb_types.h> /* RCSID("$KTH: strlcat.c,v 1.1 2000/08/16 01:23:47 lha Exp $"); */ diff --git a/ndb/src/common/util/strlcpy.c b/ndb/src/common/util/strlcpy.c index 70233e3e239..97cff177d48 100644 --- a/ndb/src/common/util/strlcpy.c +++ b/ndb/src/common/util/strlcpy.c @@ -32,16 +32,11 @@ */ #include <ndb_global.h> -#include <ndb_types.h> /* RCSID("$KTH: strlcpy.c,v 1.1 2000/08/16 01:23:48 lha Exp $"); */ #ifndef HAVE_STRLCPY -#ifdef NDB_WIN32 -#include <string.h> -#endif - size_t strlcpy (char *dst, const char *src, size_t dst_sz) { diff --git a/ndb/src/cw/cpcd/Process.cpp b/ndb/src/cw/cpcd/Process.cpp index 8a79669937d..4c6bf6ce0f6 100644 --- a/ndb/src/cw/cpcd/Process.cpp +++ b/ndb/src/cw/cpcd/Process.cpp @@ -25,10 +25,7 @@ #include "CPCD.hpp" #include <pwd.h> -#include <sys/stat.h> #include <sys/resource.h> -#include <sys/types.h> -#include <sys/wait.h> void CPCD::Process::print(FILE * f){ diff --git a/ndb/src/cw/cpcd/common.cpp b/ndb/src/cw/cpcd/common.cpp index b2de90c468e..cb1c0c37183 100644 --- a/ndb/src/cw/cpcd/common.cpp +++ b/ndb/src/cw/cpcd/common.cpp @@ -14,11 +14,11 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> + #include "common.hpp" #include <logger/Logger.hpp> #include <pwd.h> -#include <sys/types.h> -#include <unistd.h> #include <Properties.hpp> #include <BaseString.hpp> diff --git a/ndb/src/cw/cpcd/main.cpp b/ndb/src/cw/cpcd/main.cpp index 8dd4f2b4608..11f6238d5f7 100644 --- a/ndb/src/cw/cpcd/main.cpp +++ b/ndb/src/cw/cpcd/main.cpp @@ -14,9 +14,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <sys/types.h> /* Needed for mkdir(2) */ -#include <sys/stat.h> /* Needed for mkdir(2) */ -#include <errno.h> +#include <ndb_global.h> /* Needed for mkdir(2) */ #include <signal.h> #include "CPCD.hpp" diff --git a/ndb/src/kernel/blocks/dbdict/printSchemafile/printSchemafile.cpp b/ndb/src/kernel/blocks/dbdict/printSchemafile/printSchemafile.cpp index 51f05ae1d6e..bf721a0b30a 100644 --- a/ndb/src/kernel/blocks/dbdict/printSchemafile/printSchemafile.cpp +++ b/ndb/src/kernel/blocks/dbdict/printSchemafile/printSchemafile.cpp @@ -16,7 +16,6 @@ #include <ndb_global.h> -#include <sys/stat.h> #include <NdbMain.h> #include <NdbOut.hpp> diff --git a/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp b/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp index 90bb1ded490..efa4b9c92c5 100644 --- a/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp +++ b/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp @@ -16,7 +16,6 @@ #include <ndb_global.h> -#include <sys/stat.h> #include <NdbMain.h> #include <NdbOut.hpp> diff --git a/ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp b/ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp index b9954ba130f..004752c9543 100644 --- a/ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp +++ b/ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp @@ -16,10 +16,8 @@ //#define TESTDEBUG 1 -#include <sys/stat.h> -#include <fcntl.h> +#include <ndb_global.h> -#include <string.h> #include <kernel_types.h> #include <Pool.hpp> #include "AsyncFile.hpp" diff --git a/ndb/src/kernel/error/TimeModule.cpp b/ndb/src/kernel/error/TimeModule.cpp index c0f4e40858f..4bd8e3daf99 100644 --- a/ndb/src/kernel/error/TimeModule.cpp +++ b/ndb/src/kernel/error/TimeModule.cpp @@ -16,8 +16,8 @@ +#include <ndb_global.h> #include "TimeModule.hpp" -#include <time.h> static const char* cMonth[] = { "x", "January", "February", "Mars", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; diff --git a/ndb/src/kernel/ndb-main/Main.cpp b/ndb/src/kernel/ndb-main/Main.cpp index 1c0f42dab76..1619ee417f5 100644 --- a/ndb/src/kernel/ndb-main/Main.cpp +++ b/ndb/src/kernel/ndb-main/Main.cpp @@ -42,9 +42,6 @@ #endif extern EventLogger g_eventLogger; -#if defined (NDB_LINUX) || defined (NDB_SOLARIS) -#include <sys/wait.h> -#endif void catchsigs(bool ignore); // for process signal handling extern "C" void handler(int signo); // for process signal handling diff --git a/ndb/src/mgmsrv/MgmtSrvr.cpp b/ndb/src/mgmsrv/MgmtSrvr.cpp index 23ceeb15947..08bfe20aa95 100644 --- a/ndb/src/mgmsrv/MgmtSrvr.cpp +++ b/ndb/src/mgmsrv/MgmtSrvr.cpp @@ -14,10 +14,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> +#include <my_pthread.h> + #include "MgmtSrvr.hpp" #include "MgmtErrorReporter.hpp" -#include <ctype.h> #include <NdbOut.hpp> #include <AttrType.hpp> #include <NdbApiSignal.hpp> @@ -42,15 +44,11 @@ #include <EventLogger.hpp> #include <DebuggerNames.hpp> #include <ndb_version.h> -#include <string.h> #include "SocketServer.hpp" #include "NodeLogLevel.hpp" #include <NdbConfig.h> -#include <time.h> -#include <pthread.h> - //#define MGM_SRV_DEBUG #ifdef MGM_SRV_DEBUG #define DEBUG(x) do ndbout << x << endl; while(0) diff --git a/ndb/src/mgmsrv/main.cpp b/ndb/src/mgmsrv/main.cpp index 2732d091655..91b443f61a2 100644 --- a/ndb/src/mgmsrv/main.cpp +++ b/ndb/src/mgmsrv/main.cpp @@ -14,8 +14,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <ndb_global.h> + #include <signal.h> -#include <sys/ioctl.h> #include "MgmtSrvr.hpp" #include "EventLogger.hpp" @@ -198,7 +199,6 @@ NDB_MAIN(mgmsrv){ goto error_end; } -#if defined (NDB_LINUX) || defined (NDB_SOLARIS) if (glob.daemon) { // Become a daemon char homePath[255],lockfile[255], logfile[255]; @@ -210,7 +210,6 @@ NDB_MAIN(mgmsrv){ return 1; } } -#endif if(!glob.mgmObject->start()){ ndbout_c("Unable to start management server."); diff --git a/ndb/test/ndbapi/flexBench/flexBench.cpp b/ndb/test/ndbapi/flexBench/flexBench.cpp index 852944fd471..809d11086bf 100644 --- a/ndb/test/ndbapi/flexBench/flexBench.cpp +++ b/ndb/test/ndbapi/flexBench/flexBench.cpp @@ -292,7 +292,7 @@ NDB_COMMAND(flexBench, "flexBench", "flexBench", "flexbench", 65535) if(useLongKeys){ longKeyAttrName = (char **) malloc(sizeof(char*) * tNoOfLongPK); - for (int i = 0; i < tNoOfLongPK; i++) { + for (Uint32 i = 0; i < tNoOfLongPK; i++) { longKeyAttrName[i] = (char *) malloc(strlen("KEYATTR ") + 1); memset(longKeyAttrName[i], 0, strlen("KEYATTR ") + 1); sprintf(longKeyAttrName[i], "KEYATTR%i", i); @@ -531,7 +531,7 @@ NDB_COMMAND(flexBench, "flexBench", "flexBench", "flexbench", 65535) waitForThreads(pThreadsData); void * tmp; - for(int i = 0; i<tNoOfThreads; i++){ + for(Uint32 i = 0; i<tNoOfThreads; i++){ NdbThread_WaitFor(pThreadsData[i].threadLife, &tmp); NdbThread_Destroy(&pThreadsData[i].threadLife); } @@ -540,7 +540,7 @@ NDB_COMMAND(flexBench, "flexBench", "flexBench", "flexbench", 65535) if (useLongKeys == true) { // Only free these areas if they have been allocated // Otherwise cores will happen - for (int i = 0; i < tNoOfLongPK; i++) + for (Uint32 i = 0; i < tNoOfLongPK; i++) free(longKeyAttrName[i]); free(longKeyAttrName); } // if @@ -629,13 +629,13 @@ static void* flexBenchThread(void* pArg) if(useLongKeys){ // Allocate and populate the longkey array. longKeyAttrValue = (unsigned ***) malloc(sizeof(unsigned**) * tNoOfOperations ); - for (int n = 0; n < tNoOfOperations; n++) + for (Uint32 n = 0; n < tNoOfOperations; n++) longKeyAttrValue[n] = (unsigned **) malloc(sizeof(unsigned*) * tNoOfLongPK ); - for (int n = 0; n < tNoOfOperations; n++){ - for (int i = 0; i < tNoOfLongPK ; i++) { + for (Uint32 n = 0; n < tNoOfOperations; n++){ + for (Uint32 i = 0; i < tNoOfLongPK ; i++) { longKeyAttrValue[n][i] = (unsigned *) malloc(sizeof(unsigned) * tSizeOfLongPK); memset(longKeyAttrValue[n][i], 0, sizeof(unsigned) * tSizeOfLongPK); - for(int j = 0; j < tSizeOfLongPK; j++) { + for(Uint32 j = 0; j < tSizeOfLongPK; j++) { // Repeat the unique value to fill up the long key. longKeyAttrValue[n][i][j] = threadBase + n; } @@ -645,10 +645,10 @@ static void* flexBenchThread(void* pArg) int nRefOpOffset = 0 ; //Assign reference attribute values to memory - for(int ops = 1 ; ops < tNoOfOperations ; ops++){ + for(Uint32 ops = 1 ; ops < tNoOfOperations ; ops++){ // Calculate offset value before going into the next loop nRefOpOffset = tAttributeSize*tNoOfAttributes*(ops-1) ; - for(int a = 0 ; a < tNoOfAttributes ; a++){ + for(Uint32 a = 0 ; a < tNoOfAttributes ; a++){ *(int*)&attrRefValue[nRefOpOffset + tAttributeSize*a] = (int)(threadBase + ops + a) ; } @@ -757,7 +757,7 @@ static void* flexBenchThread(void* pArg) if(useLongKeys){ // Loop the equal call so the complete key is send to the kernel. - for(int i = 0; i < tNoOfLongPK; i++) + for(Uint32 i = 0; i < tNoOfLongPK; i++) pOps[countTables]->equal(longKeyAttrName[i], (char *)longKeyAttrValue[count - 1][i], tSizeOfLongPK*4); } @@ -923,8 +923,8 @@ static void* flexBenchThread(void* pArg) if (useLongKeys == true) { // Only free these areas if they have been allocated // Otherwise cores will occur - for (int n = 0; n < tNoOfOperations; n++){ - for (int i = 0; i < tNoOfLongPK; i++) { + for (Uint32 n = 0; n < tNoOfOperations; n++){ + for (Uint32 i = 0; i < tNoOfLongPK; i++) { free(longKeyAttrValue[n][i]); } free(longKeyAttrValue[n]); @@ -1064,13 +1064,13 @@ static void sleepBeforeStartingTest(int seconds){ static int createTables(Ndb* pMyNdb){ - for (int i = 0; i < tNoOfAttributes; i++){ + for (Uint32 i = 0; i < tNoOfAttributes; i++){ snprintf(attrName[i], MAXSTRLEN, "COL%d", i); } // Note! Uses only uppercase letters in table name's // so that we can look at the tables with SQL - for (int i = 0; i < tNoOfTables; i++){ + for (Uint32 i = 0; i < tNoOfTables; i++){ if (theStdTableNameFlag == 0){ snprintf(tableName[i], MAXSTRLEN, "TAB%d_%d", i, (int)(NdbTick_CurrentMillisecond() / 1000)); @@ -1087,7 +1087,7 @@ createTables(Ndb* pMyNdb){ tmpTable.setStoredTable(!theTempTable); if(useLongKeys){ - for(int i = 0; i < tNoOfLongPK; i++) { + for(Uint32 i = 0; i < tNoOfLongPK; i++) { NdbDictionary::Column col(longKeyAttrName[i]); col.setType(NdbDictionary::Column::Unsigned); col.setLength(tSizeOfLongPK); diff --git a/ndb/test/src/HugoCalculator.cpp b/ndb/test/src/HugoCalculator.cpp index 246dde09c00..55aa96a4909 100644 --- a/ndb/test/src/HugoCalculator.cpp +++ b/ndb/test/src/HugoCalculator.cpp @@ -157,7 +157,7 @@ HugoCalculator::verifyRowValues(NDBT_ResultRow* const pRow) const{ << ", NdbDict::Column::getLength(): " << attr->getLength() << endl; const char* buf2 = pRow->attributeStore(i)->aRef(); - for (int j = 0; j < pRow->attributeStore(i)->arraySize(); j++) + for (Uint32 j = 0; j < pRow->attributeStore(i)->arraySize(); j++) { g_err << j << ":" << buf[j] << "[" << buf2[j] << "]"; if (buf[j] != buf2[j]) diff --git a/ndb/test/src/HugoOperations.cpp b/ndb/test/src/HugoOperations.cpp index edcec460ba0..91263aa29b4 100644 --- a/ndb/test/src/HugoOperations.cpp +++ b/ndb/test/src/HugoOperations.cpp @@ -652,7 +652,7 @@ void HugoOperations::deallocRows(){ int HugoOperations::saveCopyOfRecord(int numRecords ){ - if (numRecords > rows.size()) + if (numRecords > (int)rows.size()) return NDBT_FAILED; for (int i = 0; i < numRecords; i++){ @@ -662,7 +662,7 @@ int HugoOperations::saveCopyOfRecord(int numRecords ){ } BaseString HugoOperations::getRecordStr(int recordNum){ - if (recordNum > rows.size()) + if (recordNum > (int)rows.size()) return NULL; return rows[recordNum]->c_str(); } @@ -673,7 +673,7 @@ int HugoOperations::getRecordGci(int recordNum){ int HugoOperations::compareRecordToCopy(int numRecords ){ - if (numRecords > rows.size()) + if (numRecords > (int)rows.size()) return NDBT_FAILED; if ((unsigned)numRecords > savedRecords.size()) return NDBT_FAILED; diff --git a/ndb/test/src/HugoTransactions.cpp b/ndb/test/src/HugoTransactions.cpp index 1293d395974..7f12484ddc8 100644 --- a/ndb/test/src/HugoTransactions.cpp +++ b/ndb/test/src/HugoTransactions.cpp @@ -1253,9 +1253,11 @@ HugoTransactions::eventOperation(Ndb* pNdb, void* pstats, g_info << " UPDATE: "; recEvent = recUpdateEvent; break; + case NdbDictionary::Event::TE_ALL: + abort(); } - if (pk < records) { + if ((int)pk < records) { recEvent[pk].pk = pk; recEvent[pk].count++; } @@ -1304,7 +1306,7 @@ HugoTransactions::eventOperation(Ndb* pNdb, void* pstats, if (stats.n_updates > 0) { stats.n_consecutive++; } - for (Uint32 i = 0; i < records/3; i++) { + for (Uint32 i = 0; i < (Uint32)records/3; i++) { if (recInsertEvent[i].pk != i) { stats.n_consecutive ++; ndbout << "missing insert pk " << i << endl; diff --git a/ndb/test/src/NDBT_ResultRow.cpp b/ndb/test/src/NDBT_ResultRow.cpp index 87694aabb2b..ba46be203e1 100644 --- a/ndb/test/src/NDBT_ResultRow.cpp +++ b/ndb/test/src/NDBT_ResultRow.cpp @@ -66,6 +66,7 @@ NDBT_ResultRow::attributeStore(const char* name){ return data[i]; } assert(false); + return 0; } NdbOut & @@ -189,7 +190,8 @@ NDBT_ResultRow::clone () const { NDBT_ResultRow * row = new NDBT_ResultRow(m_table, ad[0]); row->m_ownData = true; - for(Uint32 i = 0; i<m_table.getNoOfColumns(); i++){ + Uint32 noOfColumns = m_table.getNoOfColumns(); + for(Uint32 i = 0; i < noOfColumns; i++){ row->data[i] = data[i]->clone(); } diff --git a/ndb/test/src/NdbBackup.cpp b/ndb/test/src/NdbBackup.cpp index 3f73369f488..6cbb69508f5 100644 --- a/ndb/test/src/NdbBackup.cpp +++ b/ndb/test/src/NdbBackup.cpp @@ -66,7 +66,6 @@ NdbBackup::getFileSystemPathForNode(int _node_id){ /** * Fetch configuration from management server */ - char buf[255]; ConfigRetriever cr; diff --git a/ndb/test/src/NdbConfig.cpp b/ndb/test/src/NdbConfig.cpp index aa0bb252f58..3a254bc1577 100644 --- a/ndb/test/src/NdbConfig.cpp +++ b/ndb/test/src/NdbConfig.cpp @@ -31,7 +31,6 @@ NdbConfig::getPropsForNode(unsigned int node_id, /** * Fetch configuration from management server */ - char buf[255]; ConfigRetriever cr; @@ -111,7 +110,6 @@ NdbConfig::getHostName(unsigned int node_id, /** * Fetch configuration from management server */ - char buf[255]; ConfigRetriever cr; diff --git a/ndb/test/src/NdbRestarter.cpp b/ndb/test/src/NdbRestarter.cpp index 252fa28feec..cc2fab46cc5 100644 --- a/ndb/test/src/NdbRestarter.cpp +++ b/ndb/test/src/NdbRestarter.cpp @@ -167,7 +167,7 @@ NdbRestarter::getRandomNotMasterNodeId(int rand){ if(master == -1) return -1; - int counter = 0; + Uint32 counter = 0; rand = rand % ndbNodes.size(); while(counter++ < ndbNodes.size() && ndbNodes[rand].node_id == master) rand = (rand + 1) % ndbNodes.size(); @@ -196,7 +196,7 @@ NdbRestarter::getRandomNodeOtherNodeGroup(int nodeId, int rand){ return -1; } - int counter = 0; + Uint32 counter = 0; rand = rand % ndbNodes.size(); while(counter++ < ndbNodes.size() && ndbNodes[rand].node_group == node_group) rand = (rand + 1) % ndbNodes.size(); diff --git a/ndb/tools/cpcc/cpcc.cpp b/ndb/tools/cpcc/cpcc.cpp index 745f897a096..e768d707bbc 100644 --- a/ndb/tools/cpcc/cpcc.cpp +++ b/ndb/tools/cpcc/cpcc.cpp @@ -116,7 +116,7 @@ public: } virtual bool evaluate(SimpleCpcClient* c,const SimpleCpcClient::Process & p){ - return p.m_id == id && c == host; + return p.m_id == (int)id && c == host; } }; |