MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:September 25 2009 1:38pm
Subject:bzr commit into mysql-5.1-telco-7.0 branch (jonas:3041)
View as plain text  
#At file:///home/jonas/src/telco-6.4/ based on revid:magnus.blaudd@stripped

 3041 Jonas Oreland	2009-09-25 [merge]
      merge 63 to 70

    modified:
      config/ac-macros/zlib.m4
      storage/ndb/src/kernel/Makefile.am
      storage/ndb/src/kernel/vm/ArrayPool.hpp
      storage/ndb/src/kernel/vm/SimulatedBlock.hpp
      storage/ndb/test/include/NDBT_Thread.hpp
      storage/ndb/test/ndbapi/ScanFilter.hpp
      storage/ndb/test/ndbapi/bank/bankCreator.cpp
      storage/ndb/test/ndbapi/bank/bankMakeGL.cpp
      storage/ndb/test/ndbapi/bank/bankSumAccounts.cpp
      storage/ndb/test/ndbapi/bank/bankTimer.cpp
      storage/ndb/test/ndbapi/bank/bankTransactionMaker.cpp
      storage/ndb/test/ndbapi/bank/bankValidateAllGLs.cpp
      storage/ndb/test/ndbapi/bench/asyncGenerator.cpp
      storage/ndb/test/ndbapi/bench/userInterface.cpp
      storage/ndb/test/ndbapi/flexBench.cpp
      storage/ndb/test/ndbapi/flexHammer.cpp
      storage/ndb/test/ndbapi/flexTT.cpp
      storage/ndb/test/ndbapi/slow_select.cpp
      storage/ndb/test/ndbapi/testBasic.cpp
      storage/ndb/test/ndbapi/testDeadlock.cpp
      storage/ndb/test/ndbapi/testDict.cpp
      storage/ndb/test/ndbapi/testLcp.cpp
      storage/ndb/test/ndbapi/testNodeRestart.cpp
      storage/ndb/test/ndbapi/testOIBasic.cpp
      storage/ndb/test/ndbapi/testOperations.cpp
      storage/ndb/test/ndbapi/testReadPerf.cpp
      storage/ndb/test/ndbapi/testScanPerf.cpp
      storage/ndb/test/ndbapi/testTimeout.cpp
      storage/ndb/test/ndbapi/test_event.cpp
      storage/ndb/test/ndbapi/test_event_merge.cpp
      storage/ndb/test/run-test/atrt.hpp
      storage/ndb/test/run-test/setup.cpp
      storage/ndb/test/src/HugoCalculator.cpp
      storage/ndb/test/src/NDBT_Thread.cpp
      storage/ndb/test/src/UtilTransactions.cpp
      storage/ndb/test/tools/cpcc.cpp
      storage/ndb/test/tools/restart.cpp
=== modified file 'config/ac-macros/zlib.m4'
--- a/config/ac-macros/zlib.m4	2008-04-25 06:32:23 +0000
+++ b/config/ac-macros/zlib.m4	2009-09-24 18:56:22 +0000
@@ -19,6 +19,7 @@ AC_DEFUN([MYSQL_CHECK_ZLIB_DIR], [
 save_CPPFLAGS="$CPPFLAGS"
 save_LIBS="$LIBS"
 CPPFLAGS="$ZLIB_INCLUDES $CPPFLAGS"
+LIBS="$LIBS $ZLIB_LIBS"
 if test X"$with_server" = Xno
 then
   zlibsym=zlibVersion

=== modified file 'storage/ndb/src/kernel/Makefile.am'
--- a/storage/ndb/src/kernel/Makefile.am	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/src/kernel/Makefile.am	2009-09-25 13:38:00 +0000
@@ -66,7 +66,7 @@ LIBS= \
               $(top_builddir)/dbug/libdbuglt.la \
               $(top_builddir)/mysys/libmysyslt.la \
               $(top_builddir)/strings/libmystringslt.la \
-              $(top_builddir)/zlib/libzlt.la @NDB_SCI_LIBS@ 
+              @ZLIB_LIBS@ @NDB_SCI_LIBS@ 
 
 ndbd_LDADD = $(LIBS) vm/libsched.a
 ndbmtd_LDADD = $(LIBS) vm/libsched_mt.a

=== modified file 'storage/ndb/src/kernel/vm/ArrayPool.hpp'
--- a/storage/ndb/src/kernel/vm/ArrayPool.hpp	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/src/kernel/vm/ArrayPool.hpp	2009-09-25 13:38:00 +0000
@@ -297,11 +297,11 @@ ArrayPool<T>::setSize(Uint32 noOfElement
     {
       char errmsg[255] = "ArrayPool<T>::setSize malloc failed";
       struct ndb_mgm_param_info param_info;
-      size_t size = sizeof(ndb_mgm_param_info);
+      size_t tsize = sizeof(ndb_mgm_param_info);
       if (!exit_on_error)
 	return false;
 
-      if(0 != paramId && 0 == ndb_mgm_get_db_parameter_info(paramId, &param_info, &size)) {
+      if(0 != paramId && 0 == ndb_mgm_get_db_parameter_info(paramId, &param_info, &tsize)) {
         BaseString::snprintf(errmsg, sizeof(errmsg), 
                 "Malloc memory for %s failed", param_info.m_name);
       }

=== modified file 'storage/ndb/src/kernel/vm/SimulatedBlock.hpp'
--- a/storage/ndb/src/kernel/vm/SimulatedBlock.hpp	2009-09-21 08:42:40 +0000
+++ b/storage/ndb/src/kernel/vm/SimulatedBlock.hpp	2009-09-25 13:38:00 +0000
@@ -1212,18 +1212,18 @@ SectionHandle::~SectionHandle()
 #define RSS_OP_SNAPSHOT_SAVE(x) rss_##x = x
 #define RSS_OP_SNAPSHOT_CHECK(x) ndbrequire(rss_##x == x)
 #else
-#define RSS_AP_SNAPSHOT(x)
+#define RSS_AP_SNAPSHOT(x) struct rss_dummy0_##x { int dummy; }
 #define RSS_AP_SNAPSHOT_SAVE(x)
 #define RSS_AP_SNAPSHOT_CHECK(x)
 
-#define RSS_OP_COUNTER(x)
+#define RSS_OP_COUNTER(x) struct rss_dummy1_##x { int dummy; }
 #define RSS_OP_COUNTER_INIT(x)
 #define RSS_OP_ALLOC(x)
 #define RSS_OP_FREE(x)
 #define RSS_OP_ALLOC_X(x,n)
 #define RSS_OP_FREE_X(x,n)
 
-#define RSS_OP_SNAPSHOT(x)
+#define RSS_OP_SNAPSHOT(x) struct rss_dummy2_##x { int dummy; }
 #define RSS_OP_SNAPSHOT_SAVE(x)
 #define RSS_OP_SNAPSHOT_CHECK(x)
 

=== modified file 'storage/ndb/test/include/NDBT_Thread.hpp'
--- a/storage/ndb/test/include/NDBT_Thread.hpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/test/include/NDBT_Thread.hpp	2009-09-25 12:49:37 +0000
@@ -25,7 +25,7 @@
 
 // NDBT_Thread ctor -> NDBT_Thread_run -> thr.run()
 extern "C" {
-static void* NDBT_Thread_run(void* arg);
+void* NDBT_Thread_run(void* arg);
 }
 
 // Function to run in a thread.
@@ -108,10 +108,12 @@ public:
   template <class T> inline void set_output() {
     set_output(new T);
   }
+#if 0
   inline void delete_output() {
     delete m_output;
     m_output = 0;
   }
+#endif
 
   // thread-specific Ndb object
   inline class Ndb* get_ndb() const {

=== modified file 'storage/ndb/test/ndbapi/ScanFilter.hpp'
--- a/storage/ndb/test/ndbapi/ScanFilter.hpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/test/ndbapi/ScanFilter.hpp	2009-09-25 12:49:37 +0000
@@ -40,6 +40,7 @@ public:
 	     int val);
 #endif
   ScanFilter(int records = 1000){};
+  virtual ~ScanFilter() {}
   virtual int filterOp(NdbOperation*) = 0;
   virtual int verifyRecord(NDBT_ResultRow&) = 0;
 private:
@@ -50,6 +51,7 @@ private:
 class LessThanFilter : public ScanFilter {
 public:
   LessThanFilter(int records){ compare_value = records / 100; };
+  virtual ~LessThanFilter(){}
 private:
   Uint32 compare_value;
   int filterOp(NdbOperation* pOp);
@@ -57,12 +59,17 @@ private:
 };
 
 class EqualFilter : public ScanFilter {
+public:
+  virtual ~EqualFilter(){}
+
   static const Uint32 compare_value = 100;
   int filterOp(NdbOperation* pOp);
   int verifyRecord(NDBT_ResultRow&);
 };
 
 class NoFilter : public ScanFilter {
+public:
+  virtual ~NoFilter(){}
   int filterOp(NdbOperation* pOp);
   int verifyRecord(NDBT_ResultRow&);
 };

=== modified file 'storage/ndb/test/ndbapi/bank/bankCreator.cpp'
--- a/storage/ndb/test/ndbapi/bank/bankCreator.cpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/test/ndbapi/bank/bankCreator.cpp	2009-09-25 12:49:37 +0000
@@ -31,7 +31,7 @@
 int main(int argc, const char** argv){
   ndb_init();
   int _help = 0;
-  char * _database = "BANK";
+  const char * _database = "BANK";
   int disk = 0;
   int skip_create = 0;
 

=== modified file 'storage/ndb/test/ndbapi/bank/bankMakeGL.cpp'
--- a/storage/ndb/test/ndbapi/bank/bankMakeGL.cpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/test/ndbapi/bank/bankMakeGL.cpp	2009-09-25 13:11:39 +0000
@@ -31,7 +31,7 @@
 int main(int argc, const char** argv){
   ndb_init();
   int _help = 0;
-  char * _database = "BANK";
+  const char * _database = "BANK";
   
   struct getargs args[] = {
     { "usage", '?', arg_flag, &_help, "Print help", "" },

=== modified file 'storage/ndb/test/ndbapi/bank/bankSumAccounts.cpp'
--- a/storage/ndb/test/ndbapi/bank/bankSumAccounts.cpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/test/ndbapi/bank/bankSumAccounts.cpp	2009-09-25 12:49:37 +0000
@@ -31,7 +31,7 @@
 int main(int argc, const char** argv){
   ndb_init();
   int _help = 0;
-  char * _database="BANK";
+  const char * _database="BANK";
   
   struct getargs args[] = {
     { "usage", '?', arg_flag, &_help, "Print help", "" },

=== modified file 'storage/ndb/test/ndbapi/bank/bankTimer.cpp'
--- a/storage/ndb/test/ndbapi/bank/bankTimer.cpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/test/ndbapi/bank/bankTimer.cpp	2009-09-25 13:11:39 +0000
@@ -33,7 +33,7 @@ int main(int argc, const char** argv){
   ndb_init();
   int _help = 0;
   int _wait = 30;
-  char * _database="BANK";
+  const char * _database="BANK";
   
   struct getargs args[] = {
     { "wait", 'w', arg_integer, &_wait, "Max time to wait between days", "secs" },

=== modified file 'storage/ndb/test/ndbapi/bank/bankTransactionMaker.cpp'
--- a/storage/ndb/test/ndbapi/bank/bankTransactionMaker.cpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/test/ndbapi/bank/bankTransactionMaker.cpp	2009-09-25 12:49:37 +0000
@@ -33,7 +33,7 @@ int main(int argc, const char** argv){
   ndb_init();
   int _help = 0;
   int _wait = 20;
-  char * _database = "BANK";
+  const char * _database = "BANK";
   
   struct getargs args[] = {
     { "wait", 'w', arg_integer, &_wait, "Time to wait between transactions", "ms" },

=== modified file 'storage/ndb/test/ndbapi/bank/bankValidateAllGLs.cpp'
--- a/storage/ndb/test/ndbapi/bank/bankValidateAllGLs.cpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/test/ndbapi/bank/bankValidateAllGLs.cpp	2009-09-25 12:49:37 +0000
@@ -32,7 +32,7 @@
 int main(int argc, const char** argv){
   ndb_init();
   int _help = 0;
-  char * _database="BANK";
+  const char * _database="BANK";
   
   struct getargs args[] = {
     { "usage", '?', arg_flag, &_help, "Print help", "" },

=== modified file 'storage/ndb/test/ndbapi/bench/asyncGenerator.cpp'
--- a/storage/ndb/test/ndbapi/bench/asyncGenerator.cpp	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/test/ndbapi/bench/asyncGenerator.cpp	2009-09-25 13:38:00 +0000
@@ -254,7 +254,7 @@ doTransaction_T1(Ndb * pNDB, ThreadData 
   getRandomChangedBy(td->transactionData.changed_by);
   BaseString::snprintf(td->transactionData.changed_time,
 	   sizeof(td->transactionData.changed_time),
-	   "%ld - %d", td->changedTime++, myRandom48(65536*1024));
+                       "%ld - %u", td->changedTime++, (unsigned)myRandom48(65536*1024));
   //getRandomChangedTime(td->transactionData.changed_time);
   td->transactionData.location = td->transactionData.changed_by[0];
   

=== modified file 'storage/ndb/test/ndbapi/bench/userInterface.cpp'
--- a/storage/ndb/test/ndbapi/bench/userInterface.cpp	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/test/ndbapi/bench/userInterface.cpp	2009-09-25 13:38:00 +0000
@@ -49,8 +49,6 @@
 
 extern int localDbPrepare(UserHandle *uh);
 
-//static int dbCreate(UserHandle *uh);
-
 /***************************************************************
 * L O C A L   D A T A                                          *
 ***************************************************************/

=== modified file 'storage/ndb/test/ndbapi/flexBench.cpp'
--- a/storage/ndb/test/ndbapi/flexBench.cpp	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/test/ndbapi/flexBench.cpp	2009-09-25 13:38:00 +0000
@@ -268,7 +268,7 @@ waitForThreads(ThreadData* pt)
     cont = 0;
     for (unsigned int i = 0; i < tNoOfThreads; i++){
       if (pt[i].threadReady == 0) 
-    cont = 1;
+        cont = 1;
     }
   }
 }
@@ -367,7 +367,7 @@ NDB_COMMAND(flexBench, "flexBench", "fle
      ****************************************************************/
     resetThreads(pThreadsData);
     
-    for (Uint32 i = 0; i < tNoOfThreads; i++){  
+    for (int i = 0; i < (int)tNoOfThreads; i++){  
       pThreadsData[i].threadNo = i;
       pThreadsData[i].threadLife = NdbThread_Create(flexBenchThread,
                                                     (void**)&pThreadsData[i],
@@ -543,7 +543,7 @@ NDB_COMMAND(flexBench, "flexBench", "fle
     waitForThreads(pThreadsData);
 
     void * tmp;
-    for(Uint32 i = 0; i<tNoOfThreads; i++){
+    for(int i = 0; i<(int)tNoOfThreads; i++){
       NdbThread_WaitFor(pThreadsData[i].threadLife, &tmp);
       NdbThread_Destroy(&pThreadsData[i].threadLife);
     }
@@ -552,7 +552,7 @@ NDB_COMMAND(flexBench, "flexBench", "fle
   if (useLongKeys == true) {
     // Only free these areas if they have been allocated
     // Otherwise cores will happen
-    for (Uint32 i = 0; i < tNoOfLongPK; i++)
+    for (int i = 0; i < (int)tNoOfLongPK; i++)
       free(longKeyAttrName[i]);
     free(longKeyAttrName);
   } // if
@@ -595,7 +595,6 @@ static void* flexBenchThread(void* pArg)
                     pOps = NULL ;
   StartType         tType ;
   StartType         tSaveType ;
-  NdbRecAttr*       tTmp = NULL ;
   int*              attrValue = NULL ;
   int*              attrRefValue = NULL ;
   int               check = 0 ;
@@ -648,7 +647,7 @@ static void* flexBenchThread(void* pArg)
   
   /* Set up NdbRecord's for the tables. */
   dict= pNdb->getDictionary();
-  for (int tab= 0; tab<tNoOfTables; tab++)
+  for (int tab= 0; tab<(int)tNoOfTables; tab++)
   {
     const NdbDictionary::Table *table= dict->getTable(tableName[tab]);
     int numPKs= (useLongKeys ? tNoOfLongPK : 1);
@@ -774,7 +773,7 @@ static void* flexBenchThread(void* pArg)
     // Calculate offset value before going into the next loop
     nRefOpOffset = tAttributeSize*tNoOfAttributes*(ops-1) ; 
     for(Uint32 a = 0 ; a < tNoOfAttributes ; a++)
-      for(int b= 0; b<tAttributeSize; b++)
+      for(Uint32 b= 0; b<(Uint32)tAttributeSize; b++)
         attrRefValue[nRefOpOffset + tAttributeSize*a + b] = 
           (int)(threadBase + ops + a) ;
   }
@@ -862,7 +861,6 @@ static void* flexBenchThread(void* pArg)
         const NdbRecord *pk_record= pRec[countTables];
         const NdbRecord *attr_record= pRec[countTables+tNoOfTables];
         const NdbRecord *all_record= pRec[countTables+2*tNoOfTables];
-        const char *tabName= tableName[countTables];
 
 	switch (tType) {
 	case stInsert:          // Insert case
@@ -1200,7 +1198,7 @@ static void sleepBeforeStartingTest(int 
 static int
 createTables(Ndb* pMyNdb){
   for (Uint32 i = 0; i < tNoOfAttributes; i++){
-    BaseString::snprintf(attrName[i], MAXSTRLEN, "COL%d", i);
+    BaseString::snprintf(attrName[i], MAXSTRLEN, "COL%u", i);
   }
 
   // Note! Uses only uppercase letters in table name's

=== modified file 'storage/ndb/test/ndbapi/flexHammer.cpp'
--- a/storage/ndb/test/ndbapi/flexHammer.cpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/test/ndbapi/flexHammer.cpp	2009-09-25 12:49:37 +0000
@@ -107,7 +107,7 @@ static int setTableNames(void);
 static int readArguments(int, const char**);
 static int createTables(Ndb*);
 static void sleepBeforeStartingTest(int seconds);
-static int checkThreadResults(ThreadNdb *threadArrayP, char* phase);
+static int checkThreadResults(ThreadNdb *threadArrayP, const char* phase);
 
 //enum OperationType {
 //  otInsert,
@@ -858,8 +858,8 @@ static int setTableNames()
 
   for (i = 0; i < MAXTABLES ; i++) {
     if (theStandardTableNameFlag == 0) {
-      retVal = BaseString::snprintf(tableName[i], MAXSTRLEN, "TAB%d_%d", i, 
-		 NdbTick_CurrentMillisecond()/1000);
+      retVal = BaseString::snprintf(tableName[i], MAXSTRLEN, "TAB%d_%u", i, 
+                                    (Uint32)(NdbTick_CurrentMillisecond()/1000));
     } // if 
     else {
       retVal = BaseString::snprintf(tableName[i], MAXSTRLEN, "TAB%d", i);
@@ -873,7 +873,7 @@ static int setTableNames()
   return(0);
 } // setTableNames
 
-static int checkThreadResults(ThreadNdb *threadArrayP, char* phase)
+static int checkThreadResults(ThreadNdb *threadArrayP, const char* phase)
 {
   int i = 0;
 

=== modified file 'storage/ndb/test/ndbapi/flexTT.cpp'
--- a/storage/ndb/test/ndbapi/flexTT.cpp	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/test/ndbapi/flexTT.cpp	2009-09-25 13:38:00 +0000
@@ -150,7 +150,7 @@ static int                              
 static void 
 resetThreads(){
 
-  for (Uint32 i = 0; i < tNoOfThreads ; i++) {
+  for (int i = 0; i < (int)tNoOfThreads ; i++) {
     ThreadReady[i] = 0;
     ThreadStart[i] = stIdle;
   }//for
@@ -163,7 +163,7 @@ waitForThreads(void)
   do {
     cont = 0;
     NdbSleep_MilliSleep(20);
-    for (Uint32 i = 0; i < tNoOfThreads ; i++) {
+    for (int i = 0; i < (int)tNoOfThreads ; i++) {
       if (ThreadReady[i] == 0) {
         cont = 1;
       }//if
@@ -174,7 +174,7 @@ waitForThreads(void)
 static void 
 tellThreads(StartType what)
 {
-  for (Uint32 i = 0; i < tNoOfThreads ; i++) 
+  for (int i = 0; i < (int)tNoOfThreads ; i++) 
     ThreadStart[i] = what;
 }
 
@@ -268,7 +268,7 @@ NDB_COMMAND(flexTT, "flexTT", "flexTT", 
      *  Create NDB objects.                                   *
      ****************************************************************/
     resetThreads();
-    for (Uint32 i = 0; i < tNoOfThreads ; i++) {
+    for (int i = 0; i < (int)tNoOfThreads ; i++) {
       pThreadData[i].threadNo = i;
       threadLife[i] = NdbThread_Create(threadLoop,
                                        (void**)&pThreadData[i],
@@ -319,7 +319,7 @@ NDB_COMMAND(flexTT, "flexTT", "flexTT", 
         
     execute(stStop);
     void * tmp;
-    for(Uint32 i = 0; i<tNoOfThreads; i++){
+    for(int i = 0; i<(int)tNoOfThreads; i++){
       NdbThread_WaitFor(threadLife[i], &tmp);
       NdbThread_Destroy(&threadLife[i]);
     }
@@ -476,7 +476,7 @@ getKey(Uint32 aBase, Uint32 aThreadBase)
     tKey32[1] = i;
     hash = md5_hash((Uint64*)&Tkey64, (Uint32)2);
     hash = (hash >> 6) & (MAX_PARTS - 1);
-    if (hash == tLocalPart) {
+    if (hash == (Uint32)tLocalPart) {
       Tfound = i;
       break;
     }//if
@@ -538,7 +538,7 @@ executeCallback(int result, NdbConnectio
         tabThread->threadLoopCounter++;
         transNdbRef->vpn_identity = 0;
         tabThread->threadNextStart = 0;
-        if (tabThread->threadLoopCounter == tNoOfLoops) {
+        if (tabThread->threadLoopCounter == (Uint32)tNoOfLoops) {
           goto checkCompleted;
         }//if
       }//if
@@ -567,8 +567,8 @@ random_choice()
 //----------------------------------------------------
 // Generate a random key between 0 and tNoOfRecords - 1
 //----------------------------------------------------
-   long random_number = lrand48() % 100;
-   if (random_number < tUpdateFreq)
+   UintR random_number = lrand48() % 100;
+   if ((int)random_number < tUpdateFreq)
     return stUpdate;
   else
     return stRead;
@@ -780,6 +780,8 @@ bool error_handler(const NdbError& err){
   case NdbError::TimeoutExpired:
     ndbout << endl << "Attempting to recover and continue now..." << endl ;
     return true ; // return true to retry
+  default:
+    break;
   }
   return false;
 }
@@ -831,7 +833,7 @@ readArguments(int argc, const char** arg
       }
     } else if (strcmp(argv[i], "-e") == 0){
       tMinEvents = atoi(argv[i+1]);
-      if ((tMinEvents < 1) || (tMinEvents > tNoOfParallelTrans)) {
+      if ((tMinEvents < 1) || (tMinEvents > (int)tNoOfParallelTrans)) {
 	ndbout_c("Invalid no of loops");
         return -1;
       }
@@ -921,7 +923,7 @@ input_error(){
   
   ndbout_c("FLEXTT");
   ndbout_c("   Perform benchmark of insert, update and delete transactions");
-  ndbout_c("");
+  ndbout_c(" ");
   ndbout_c("Arguments:");
   ndbout_c("   -t Number of threads to start, default 1");
   ndbout_c("   -p Number of parallel transactions per thread, default 32");

=== modified file 'storage/ndb/test/ndbapi/slow_select.cpp'
--- a/storage/ndb/test/ndbapi/slow_select.cpp	2005-04-27 01:19:54 +0000
+++ b/storage/ndb/test/ndbapi/slow_select.cpp	2009-09-25 13:11:39 +0000
@@ -145,7 +145,7 @@ main(void){
 	if(metaid == match_val){
 	  //ndbout_c("flera");
 	  nextF[F_sz++] = F[i];
-	  require(F_sz >= 0 && F_sz <= cnt);
+	  require(F_sz <= cnt);
 	  F[i]->match_count++;
 	  Uint32 comb = 1;
 	  for(j = 0; j<cnt; j++){
@@ -157,18 +157,18 @@ main(void){
 	}
 	if(metaid < max_val){
 	  nextF[F_sz++] = F[i];
-	  require(F_sz >= 0 && F_sz <= cnt);
+	  require(F_sz <= cnt);
 	  continue;
 	}
 	if(metaid > max_val){
 	  for(j = 0; j<Q_sz; j++)
 	    nextF[F_sz++] = Q[j];
-	  require(F_sz >= 0 && F_sz <= cnt);
+	  require(F_sz <= cnt);
 	  Q_sz = 0;
 	  max_val = metaid;
 	}
 	Q[Q_sz++] = F[i];
-	require(Q_sz >= 0 && Q_sz <= cnt);
+	require(Q_sz <= cnt);
       }
       if(F_sz == 0 && Q_sz > 0){
 	match_val = max_val;
@@ -176,15 +176,15 @@ main(void){
 	  nextF[F_sz++] = Q[j];
 	  Q[j]->match_count = 1;
 	}
-	require(F_sz >= 0 && F_sz <= cnt);
-	require(Q_sz >= 0 && Q_sz <= cnt);
+	require(F_sz <= cnt);
+	require(Q_sz <= cnt);
 	Q_sz = 0;
 	match_count++;
 	lookup();
       } else if(!found && F_sz + Q_sz < cnt){
 	F_sz = 0;
       }
-      require(F_sz >= 0 && F_sz <= cnt);
+      require(F_sz <= cnt);
       for(i = 0; i<F_sz; i++)
 	F[i] = nextF[i];
     }

=== modified file 'storage/ndb/test/ndbapi/testBasic.cpp'
--- a/storage/ndb/test/ndbapi/testBasic.cpp	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/test/ndbapi/testBasic.cpp	2009-09-25 13:38:00 +0000
@@ -1449,7 +1449,7 @@ runBug20535(NDBT_Context* ctx, NDBT_Step
   NdbDictionary::Dictionary * dict = pNdb->getDictionary();
 
   bool null = false;
-  for (int i = 0; i<tab->getNoOfColumns(); i++)
+  for (Uint32 i = 0; i<(Uint32)tab->getNoOfColumns(); i++)
   {
     if (tab->getColumn(i)->getNullable())
     {
@@ -1474,7 +1474,7 @@ runBug20535(NDBT_Context* ctx, NDBT_Step
   pOp = pTrans->getNdbOperation(tab->getName());
   pOp->insertTuple();
   hugoTrans.equalForRow(pOp, 0);
-  for (int i = 0; i<tab->getNoOfColumns(); i++)
+  for (Uint32 i = 0; i<(Uint32)tab->getNoOfColumns(); i++)
   {
     if (!tab->getColumn(i)->getPrimaryKey() &&
         !tab->getColumn(i)->getNullable())
@@ -1493,7 +1493,7 @@ runBug20535(NDBT_Context* ctx, NDBT_Step
   pOp->readTuple();
   hugoTrans.equalForRow(pOp, 0);
   Vector<NdbRecAttr*> values;
-  for (int i = 0; i<tab->getNoOfColumns(); i++)
+  for (Uint32 i = 0; i<(Uint32)tab->getNoOfColumns(); i++)
   {
     if (!tab->getColumn(i)->getPrimaryKey() &&
         tab->getColumn(i)->getNullable())

=== modified file 'storage/ndb/test/ndbapi/testDeadlock.cpp'
--- a/storage/ndb/test/ndbapi/testDeadlock.cpp	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/test/ndbapi/testDeadlock.cpp	2009-09-25 13:38:00 +0000
@@ -458,7 +458,7 @@ wl1822_main(char scantx)
   static const unsigned thrcount = 2;
   // create threads for tx1 and tx2
   Thr* thrlist[2];
-  int n;
+  unsigned n;
   for (n = 0; n < thrcount; n++) {
     Thr& thr = *(thrlist[n] = new Thr(1 + n));
     CHK(thr.m_ret == 0);

=== modified file 'storage/ndb/test/ndbapi/testDict.cpp'
--- a/storage/ndb/test/ndbapi/testDict.cpp	2009-09-21 11:45:18 +0000
+++ b/storage/ndb/test/ndbapi/testDict.cpp	2009-09-25 13:38:00 +0000
@@ -1254,7 +1254,7 @@ int runGetPrimaryKey(NDBT_Context* ctx, 
 int
 runCreateAutoincrementTable(NDBT_Context* ctx, NDBT_Step* step){
 
-  Uint32 startvalues[5] = {256-2, 0, 256*256-2, ~0, 256*256*256-2};
+  Uint32 startvalues[5] = {256-2, 0, 256*256-2, ~Uint32(0), 256*256*256-2};
 
   int ret = NDBT_OK;
 
@@ -1283,7 +1283,7 @@ runCreateAutoincrementTable(NDBT_Context
     myColumn.setPrimaryKey(true);
     myColumn.setNullable(false);
     myColumn.setAutoIncrement(true);
-    if (startvalue != ~(Uint32)0) // check that default value starts with 1
+    if (startvalue != ~Uint32(0)) // check that default value starts with 1
       myColumn.setAutoIncrementInitialValue(startvalue);
     myTable.addColumn(myColumn);
 
@@ -1294,7 +1294,7 @@ runCreateAutoincrementTable(NDBT_Context
     }
 
 
-    if (startvalue == ~(Uint32)0) // check that default value starts with 1
+    if (startvalue == ~Uint32(0)) // check that default value starts with 1
       startvalue = 1;
 
     for (int i = 0; i < 16; i++) {
@@ -1755,8 +1755,8 @@ runTestDictionaryPerf(NDBT_Context* ctx,
   per *= 1000;
   per /= times;
   
-  ndbout_c("%d random getColumn(name) in %Ld ms -> %d us/get",
-	   times, stop, (Uint32)per);
+  ndbout_c("%d random getColumn(name) in %Ld ms -> %u us/get",
+	   times, stop, Uint32(per));
 
   return NDBT_OK;
 }
@@ -1901,7 +1901,7 @@ int runFailAddFragment(NDBT_Context* ctx
     }
   }
 
-  for (int i = 0; i<tab.getNoOfColumns(); i++)
+  for (Uint32 i = 0; i<(Uint32)tab.getNoOfColumns(); i++)
   {
     if (tab.getColumn(i)->getStorageType() == 
         NdbDictionary::Column::StorageTypeDisk)
@@ -2604,7 +2604,6 @@ runBug29186(NDBT_Context* ctx, NDBT_Step
 {
   int lgError = 15000;
   int tsError = 16000;
-  //int res;
   char lgname[256];
   char ufname[256];
   char tsname[256];
@@ -3085,7 +3084,7 @@ runDictRestart(NDBT_Context* ctx, NDBT_S
   if (res.init(ctx, step))
     return NDBT_FAILED;
   
-  for (Uint32 i = 0; i<(Uint32)loops; i++)
+  for (int i = 0; i<loops; i++)
   {
     for (Uint32 j = 0; j<10; j++)
       if (dict.schema_op(pNdb))
@@ -3324,7 +3323,7 @@ runBug36072(NDBT_Context* ctx, NDBT_Step
                 6017, 
 #endif
                 0 };
-  for (Uint32 i = 0; i<err[i] != 0; i++)
+  for (Uint32 i = 0; err[i] != 0; i++)
   {
     int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
 

=== modified file 'storage/ndb/test/ndbapi/testLcp.cpp'
--- a/storage/ndb/test/ndbapi/testLcp.cpp	2008-10-07 05:41:21 +0000
+++ b/storage/ndb/test/ndbapi/testLcp.cpp	2009-09-25 13:38:00 +0000
@@ -87,7 +87,7 @@ main(int argc, char ** argv){
     g_err << "Failed to retreive table: " << g_tablename << endl;
     exit(-1);
   }
-  require(g_hugo_ops = new HugoOperations(* g_table));
+  require((g_hugo_ops = new HugoOperations(* g_table)) != 0);
   require(!g_hugo_ops->startTransaction(g_ndb));
   
   g_ops= new CASE[g_rows];
@@ -99,7 +99,7 @@ main(int argc, char ** argv){
       while(i < OP_COUNT && (use_ops & (1 << i)) == 0) i++;
       if(i == OP_COUNT)
 	break;
-      ndbout_c("-- loop\noperation: %c use_ops: %x", 'a'+i, use_ops);
+      ndbout_c("-- loop\noperation: %c use_ops: %x", int('a'+i), use_ops);
       g_use_ops = (1 << i);
     } else {
       i = OP_COUNT - 1;
@@ -108,7 +108,7 @@ main(int argc, char ** argv){
     size_t test_case = 0;
     if((1 << test_case++) & g_cases)
     {
-      for(int tl = 0; tl<g_case_loop; tl++){
+      for(size_t tl = 0; tl<(size_t)g_case_loop; tl++){
 	g_info << "Performing all ops wo/ inteference of LCP" << endl;
 	
 	g_info << "Testing pre LCP operations, ZLCP_OP_WRITE_RT_BREAK" << endl;
@@ -116,7 +116,7 @@ main(int argc, char ** argv){
 	  " finished before SAVE_PAGES" << endl;
 	require(!load_table());
 	require(!pause_lcp(5900));
-	for(int j = 0; j<g_rows; j++){
+	for(size_t j = 0; j<(size_t)g_rows; j++){
 	  require(!do_op(j));
 	}
 	require(!continue_lcp(5900));
@@ -129,13 +129,13 @@ main(int argc, char ** argv){
     
     if((1 << test_case++) & g_cases)
     {
-      for(int tl = 0; tl<g_case_loop; tl++){
+      for(size_t tl = 0; tl<(size_t)g_case_loop; tl++){
 	g_info << "Testing pre LCP operations, ZLCP_OP_WRITE_RT_BREAK" << endl;
 	g_info << "  where ZLCP_OP_WRITE_RT_BREAK is finished after SAVE_PAGES"
 	       << endl;
 	require(!load_table());
 	require(!pause_lcp(5901));
-	for(int j = 0; j<g_rows; j++){
+	for(size_t j = 0; j<(size_t)g_rows; j++){
 	  require(!do_op(j));
 	}
 	require(!continue_lcp(5901));
@@ -148,11 +148,11 @@ main(int argc, char ** argv){
 
     if((1 << test_case++) & g_cases)
     {
-      for(int tl = 0; tl<g_case_loop; tl++){
+      for(size_t tl = 0; tl<(size_t)g_case_loop; tl++){
 	g_info << "Testing pre LCP operations, undo-ed at commit" << endl;
 	require(!load_table());
 	require(!pause_lcp(5902));
-	for(int j = 0; j<g_rows; j++){
+	for(size_t j = 0; j<(size_t)g_rows; j++){
 	  require(!do_op(j));
 	}
 	require(!continue_lcp(5902));
@@ -166,11 +166,11 @@ main(int argc, char ** argv){
     
     if((1 << test_case++) & g_cases)
     {
-      for(int tl = 0; tl<g_case_loop; tl++){
+      for(size_t tl = 0; tl<(size_t)g_case_loop; tl++){
 	g_info << "Testing prepared during LCP and committed after" << endl;
 	require(!load_table());
 	require(!pause_lcp(5904));    // Start LCP, but don't save pages
-	for(int j = 0; j<g_rows; j++){
+	for(size_t j = 0; j<(size_t)g_rows; j++){
 	  require(!do_op(j));
 	}
 	require(!continue_lcp(5904)); // Start ACC save pages
@@ -207,10 +207,10 @@ static int parse_args(int argc, char** a
   const int num_args = sizeof(args)/sizeof(args[0]);
   if(getarg(args, num_args, argc, (const char**)argv, &optind)) {
     arg_printusage(args, num_args, argv[0], " tabname1\n");
-    ndbout_c("\n -- Operations [a-%c] = ", 'a'+OP_COUNT-1);
+    ndbout_c("\n -- Operations [a-%c] = ", int('a'+OP_COUNT-1));
     for(i = 0; i<OP_COUNT; i++){
       ndbout_c("\t%c = %s %s", 
-	       'a'+i, g_op_types[i].op1,
+	       int('a'+i), g_op_types[i].op1,
 	       g_op_types[i].op2 ? g_op_types[i].op2 : "");
     }
     return -1;
@@ -234,13 +234,13 @@ static int parse_args(int argc, char** a
   printf("operations: ");
   for(i = 0; i<OP_COUNT; i++)
     if(g_use_ops & (1 << i))
-      printf("%c", 'a'+i);
+      printf("%c", int('a'+i));
   printf("\n");
   
   printf("test cases: ");
   for(i = 0; i<3; i++)
     if(g_cases & (1 << i))
-      printf("%c", '1'+i);
+      printf("%c", int('1'+i));
   printf("\n");
   printf("-------------\n");  
   return 0;
@@ -330,7 +330,7 @@ static int load_table()
   size_t rows = 0;
   size_t uncommitted = 0;
   bool prepared = false;
-  for(int i = 0; i<g_rows; i++){
+  for(size_t i = 0; i<(size_t)g_rows; i++){
     for(op %= OP_COUNT; !((1 << op) & g_use_ops); op = (op + 1) % OP_COUNT);
     g_ops[i] = g_op_types[op++];
     if(g_ops[i].start_row){
@@ -531,7 +531,7 @@ static int restart()
   
   g_table = g_ndb->getDictionary()->getTable(g_tablename);
   require(g_table);
-  require(g_hugo_ops = new HugoOperations(* g_table));
+  require((g_hugo_ops = new HugoOperations(* g_table)) != 0);
   require(!g_hugo_ops->startTransaction(g_ndb));
   return 0;
 }
@@ -539,7 +539,7 @@ static int restart()
 static int validate()
 {
   HugoOperations ops(* g_table);
-  for(int i = 0; i<g_rows; i++){
+  for(size_t i = 0; i<(size_t)g_rows; i++){
     require(g_ops[i].curr_row == g_ops[i].end_row);
     require(!ops.startTransaction(g_ndb));
     ops.pkReadRecord(g_ndb, i, 1);

=== modified file 'storage/ndb/test/ndbapi/testNodeRestart.cpp'
--- a/storage/ndb/test/ndbapi/testNodeRestart.cpp	2009-09-21 09:13:58 +0000
+++ b/storage/ndb/test/ndbapi/testNodeRestart.cpp	2009-09-25 13:38:00 +0000
@@ -2467,7 +2467,7 @@ runBug32922(NDBT_Context* ctx, NDBT_Step
     int master = res.getMasterNodeId();    
 
     int victim = 32768;
-    for (int i = 0; i<res.getNumDbNodes(); i++)
+    for (Uint32 i = 0; i<(Uint32)res.getNumDbNodes(); i++)
     {
       int node = res.getDbNodeId(i);
       if (node != master && node < victim)

=== modified file 'storage/ndb/test/ndbapi/testOIBasic.cpp'
--- a/storage/ndb/test/ndbapi/testOIBasic.cpp	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/test/ndbapi/testOIBasic.cpp	2009-09-25 13:38:00 +0000
@@ -434,9 +434,9 @@ const char*
 Tmr::time()
 {
   if (m_cnt == 0) {
-    sprintf(m_time, "%u ms", m_ms);
+    sprintf(m_time, "%u ms", (unsigned)m_ms);
   } else {
-    sprintf(m_time, "%u ms per %u ( %u ms per 1000 )", m_ms, m_cnt, (1000 * m_ms) / m_cnt);
+    sprintf(m_time, "%u ms per %u ( %u ms per 1000 )", (unsigned)m_ms, m_cnt, (unsigned)((1000 * m_ms) / m_cnt));
   }
   return m_time;
 }
@@ -445,7 +445,7 @@ const char*
 Tmr::pct(const Tmr& t1)
 {
   if (0 < t1.m_ms) {
-    sprintf(m_text, "%u pct", (100 * m_ms) / t1.m_ms);
+    sprintf(m_text, "%u pct", (unsigned)((100 * m_ms) / t1.m_ms));
   } else {
     sprintf(m_text, "[cannot measure]");
   }
@@ -457,9 +457,9 @@ Tmr::over(const Tmr& t1)
 {
   if (0 < t1.m_ms) {
     if (t1.m_ms <= m_ms)
-      sprintf(m_text, "%u pct", (100 * (m_ms - t1.m_ms)) / t1.m_ms);
+      sprintf(m_text, "%u pct", (unsigned)((100 * (m_ms - t1.m_ms)) / t1.m_ms));
     else
-      sprintf(m_text, "-%u pct", (100 * (t1.m_ms - m_ms)) / t1.m_ms);
+      sprintf(m_text, "-%u pct", (unsigned)((100 * (t1.m_ms - m_ms)) / t1.m_ms));
   } else {
     sprintf(m_text, "[cannot measure]");
   }

=== modified file 'storage/ndb/test/ndbapi/testOperations.cpp'
--- a/storage/ndb/test/ndbapi/testOperations.cpp	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/test/ndbapi/testOperations.cpp	2009-09-25 13:38:00 +0000
@@ -415,7 +415,7 @@ verify_savepoint(NDBT_Context* ctx,
     /**
      * Increase savepoint to <em>k</em>
      */
-    for(int l = 1; l<=seq; l++)
+    for(size_t l = 1; l<=(size_t)seq; l++)
     {
       C3(same.pkReadRecord(pNdb, DUMMY, 1, lm) == 0); // Read dummy row
       C3(same.execute_NoCommit(pNdb) == 0);

=== modified file 'storage/ndb/test/ndbapi/testReadPerf.cpp'
--- a/storage/ndb/test/ndbapi/testReadPerf.cpp	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/test/ndbapi/testReadPerf.cpp	2009-09-25 13:38:00 +0000
@@ -146,7 +146,7 @@ main(int argc, const char** argv){
       goto error;
     if(load_table())
       goto error;
-    for(unsigned int l = 0; l<g_paramters[P_LOOPS].value; l++){
+    for(int l = 0; l<(int)g_paramters[P_LOOPS].value; l++){
       for(int j = 0; j<P_OP_TYPES; j++){
 	g_paramters[P_OPER].value = j;
 	if(run_read())
@@ -181,7 +181,7 @@ create_table(){
     x.setTable(g_table);
     x.setType(NdbDictionary::Index::OrderedIndex);
     x.setLogging(false);
-    for (int k = 0; k < copy.getNoOfColumns(); k++){
+    for (unsigned k = 0; k < (unsigned)copy.getNoOfColumns(); k++){
       if(copy.getColumn(k)->getPrimaryKey()){
 	x.addColumn(copy.getColumn(k)->getName());
       }

=== modified file 'storage/ndb/test/ndbapi/testScanPerf.cpp'
--- a/storage/ndb/test/ndbapi/testScanPerf.cpp	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/test/ndbapi/testScanPerf.cpp	2009-09-25 13:38:00 +0000
@@ -24,7 +24,7 @@
 #include <getarg.h>
 
 struct Parameter {
-  char * name;
+  const char * name;
   unsigned value;
   unsigned min;
   unsigned max; 

=== modified file 'storage/ndb/test/ndbapi/testTimeout.cpp'
--- a/storage/ndb/test/ndbapi/testTimeout.cpp	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/test/ndbapi/testTimeout.cpp	2009-09-25 13:38:00 +0000
@@ -333,7 +333,7 @@ int runDeadlockTimeoutTrans(NDBT_Context
       CHECK(hugoOps.pkReadRecord(pNdb, stepNo) == 0);
       CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
 
-      int sleep = (int)(deadlock_timeout * 1.5 + myRandom48(do_sleep));
+      int sleep = int(deadlock_timeout * 1.5 + myRandom48(do_sleep));
       ndbout << "Sleeping for " << sleep << " milliseconds" << endl;
       NdbSleep_MilliSleep(sleep);
 

=== modified file 'storage/ndb/test/ndbapi/test_event.cpp'
--- a/storage/ndb/test/ndbapi/test_event.cpp	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/test/ndbapi/test_event.cpp	2009-09-25 13:38:00 +0000
@@ -231,7 +231,7 @@ eventOperation(Ndb* pNdb, const NdbDicti
 
   const NdbDictionary::Table *_table = myDict->getTable(tab.getName());
 
-  for (int a = 0; a < noEventColumnName; a++) {
+  for (int a = 0; a < (int)noEventColumnName; a++) {
     recAttr[a]    = pOp->getValue(_table->getColumn(a)->getName());
     recAttrPre[a] = pOp->getPreValue(_table->getColumn(a)->getName());
   }
@@ -301,7 +301,7 @@ eventOperation(Ndb* pNdb, const NdbDicti
 	  recEvent[pk].count++;
 	}
 
-	for (int i = 1; i < noEventColumnName; i++) {
+	for (int i = 1; i < (int)noEventColumnName; i++) {
 	  if (recAttr[i]->isNULL() >= 0) { // we have a value
 	    g_info << " post[" << i << "]=";
 	    if (recAttr[i]->isNULL() == 0) // we have a non-null value
@@ -342,8 +342,8 @@ eventOperation(Ndb* pNdb, const NdbDicti
   if (stats.n_updates > 0) {
     stats.n_consecutive++;
   }
-  for (int i = 0; i < records/3; i++) {
-    if (recInsertEvent[i].pk != i) {
+  for (int i = 0; i < (int)records/3; i++) {
+    if (recInsertEvent[i].pk != Uint32(i)) {
       stats.n_consecutive ++;
       ndbout << "missing insert pk " << i << endl;
     } else if (recInsertEvent[i].count > 1) {
@@ -351,7 +351,7 @@ eventOperation(Ndb* pNdb, const NdbDicti
 	     << " count " << recInsertEvent[i].count << endl;
       stats.n_duplicates += recInsertEvent[i].count-1;
     }
-    if (recUpdateEvent[i].pk != i) {
+    if (recUpdateEvent[i].pk != Uint32(i)) {
       stats.n_consecutive ++;
       ndbout << "missing update pk " << i << endl;
     } else if (recUpdateEvent[i].count > 1) {
@@ -359,7 +359,7 @@ eventOperation(Ndb* pNdb, const NdbDicti
 	     << " count " << recUpdateEvent[i].count << endl;
       stats.n_duplicates += recUpdateEvent[i].count-1;
     }
-    if (recDeleteEvent[i].pk != i) {
+    if (recDeleteEvent[i].pk != Uint32(i)) {
       stats.n_consecutive ++;
       ndbout << "missing delete pk " << i << endl;
     } else if (recDeleteEvent[i].count > 1) {
@@ -1733,7 +1733,7 @@ static int restartAllNodes()
    * Restart all nodes using two restarts
    *   instead of one by one...as this takes to long
    */
-  for (Uint32 i = 0; i<restarter.getNumDbNodes(); i++)
+  for (Uint32 i = 0; i<(Uint32)restarter.getNumDbNodes(); i++)
   {
     int nodeId = restarter.getDbNodeId(i);
     if (ng.get(restarter.getNodeGroup(nodeId)) == false)

=== modified file 'storage/ndb/test/ndbapi/test_event_merge.cpp'
--- a/storage/ndb/test/ndbapi/test_event_merge.cpp	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/test/ndbapi/test_event_merge.cpp	2009-09-25 13:38:00 +0000
@@ -801,20 +801,20 @@ struct Run : public Tab {
     skip = false;
     evt_op = 0;
     gcicnt = 0;
-    for (i = 0; i < g_maxgcis; i++) {
+    for (i = 0; i < (int)g_maxgcis; i++) {
       gcinum[i] = (Uint64)0;
       gcievtypes[i][0] = gcievtypes[i][1] = (Uint32)0;
     }
     tableops = 0;
     blobops = 0;
     gciops = 0;
-    for (i = 0; i < g_maxpk; i++) {
+    for (i = 0; i < (int)g_maxpk; i++) {
       pk_op[i] = 0;
       pk_ev[i] = 0;
       ev_pos[i] = 0;
     }
     for (j = 0; i < 2; j ++) {
-      for (i = 0; i < g_maxcol; i++) {
+      for (i = 0; i < (int)g_maxcol; i++) {
         ev_ra[j][i] = 0;
         ev_bh[j][i] = 0;
       }
@@ -1028,7 +1028,8 @@ checkop(const Op* op, Uint32& pk1)
         const Data& d = op->data[j];
         if (d.ind[i] == 0) {
           const Data::Txt& txt = *d.ptr[i].txt;
-          for (unsigned int k = 0; k < txt.len; k++) {
+          int k;
+          for (k = 0; k < (int)txt.len; k++) {
             chkrc(strchr(g_charval, txt.val[k]) != 0);
           }
         }
@@ -1684,8 +1685,8 @@ runops()
   Op* gci_op[g_maxtab][g_maxpk];
   uint left = 0; // number of table pks with ops
   Uint32 pk1;
-  unsigned int i;
-  for (unsigned int i = 0; i < maxrun(); i++) {
+  int i;
+  for (i = 0; i < (int)maxrun(); i++) {
     Run& r = run(i);
     for (pk1 = 0; pk1 < g_opts.maxpk; pk1++) {
       gci_op[i][pk1] = 0;
@@ -1843,9 +1844,9 @@ static void
 geteventdata(Run& r)
 {
   Data (&d)[2] = g_rec_ev->data;
-  int j;
+  int i, j;
   for (j = 0; j < 2; j++) {
-    for (unsigned int i = 0; i < ncol(); i++) {
+    for (i = 0; i < (int)ncol(); i++) {
       const Col& c = getcol(i);
       int ind, ret;
       if (! c.isblob()) {
@@ -2185,7 +2186,7 @@ setseed(int n)
   if (n == -1) {
     if (g_opts.seed == 0)
       return;
-    if (g_opts.seed != -1)
+    if (g_opts.seed != (uint)-1)
       seed = (uint)g_opts.seed;
     else
       seed = 1 + (ushort)getpid();
@@ -2346,7 +2347,7 @@ checkopts()
     g_opts.no_implicit_nulls = true;
   }
   if (g_opts.maxpk > g_maxpk ||
-      g_opts.maxtab > g_maxtab) {
+      g_opts.maxtab > (int)g_maxtab) {
     return -1;
   }
   if (g_opts.blob_version < 1 || g_opts.blob_version > 2) {

=== modified file 'storage/ndb/test/run-test/atrt.hpp'
--- a/storage/ndb/test/run-test/atrt.hpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/test/run-test/atrt.hpp	2009-09-25 12:49:37 +0000
@@ -40,7 +40,7 @@ enum ErrorCodes 
 
 struct atrt_host 
 {
-  size_t m_index;
+  unsigned m_index;
   BaseString m_user;
   BaseString m_basedir;
   BaseString m_hostname;
@@ -62,7 +62,7 @@ struct atrt_options
 
 struct atrt_process 
 {
-  size_t m_index;
+  unsigned m_index;
   struct atrt_host * m_host;
   struct atrt_cluster * m_cluster;
 

=== modified file 'storage/ndb/test/run-test/setup.cpp'
--- a/storage/ndb/test/run-test/setup.cpp	2009-08-05 09:57:22 +0000
+++ b/storage/ndb/test/run-test/setup.cpp	2009-09-25 13:38:00 +0000
@@ -9,7 +9,7 @@ extern int g_mt_rr;
 
 static atrt_host * find(const char * hostname, Vector<atrt_host*>&);
 static bool load_process(atrt_config&, atrt_cluster&, atrt_process::Type, 
-			 size_t idx, const char * hostname);
+			 unsigned idx, const char * hostname);
 static bool load_options(int argc, char** argv, int type, atrt_options&);
 
 enum {
@@ -201,13 +201,13 @@ static 
 bool 
 load_process(atrt_config& config, atrt_cluster& cluster, 
 	     atrt_process::Type type, 
-	     size_t idx,
+	     unsigned idx,
 	     const char * hostname)
 {
   atrt_host * host_ptr = find(hostname, config.m_hosts);
   atrt_process *proc_ptr = new atrt_process;
 
-  const size_t proc_no = config.m_processes.size();
+  const unsigned proc_no = (unsigned)config.m_processes.size();
   config.m_processes.push_back(proc_ptr);
   host_ptr->m_processes.push_back(proc_ptr);
   cluster.m_processes.push_back(proc_ptr);
@@ -244,14 +244,14 @@ load_process(atrt_config& config, atrt_c
   switch(type){
   case atrt_process::AP_NDB_MGMD:
     groups[0] = "cluster_config";
-    buf[1].assfmt("cluster_config.ndb_mgmd.%d", idx);
+    buf[1].assfmt("cluster_config.ndb_mgmd.%u", idx);
     groups[1] = buf[1].c_str();
     buf[0].assfmt("--defaults-group-suffix=%s", cluster.m_name.c_str());
     argv[argc++] = buf[0].c_str();
     break;
   case atrt_process::AP_NDBD: 
     groups[0] = "cluster_config";
-    buf[1].assfmt("cluster_config.ndbd.%d", idx);
+    buf[1].assfmt("cluster_config.ndbd.%u", idx);
     groups[1] = buf[1].c_str();
     buf[0].assfmt("--defaults-group-suffix=%s", cluster.m_name.c_str());
     argv[argc++] = buf[0].c_str();
@@ -259,11 +259,11 @@ load_process(atrt_config& config, atrt_c
   case atrt_process::AP_MYSQLD:
     groups[0] = "mysqld";
     groups[1] = "mysql_cluster";
-    buf[0].assfmt("--defaults-group-suffix=.%d%s",idx,cluster.m_name.c_str());
+    buf[0].assfmt("--defaults-group-suffix=.%u%s",idx,cluster.m_name.c_str());
     argv[argc++] = buf[0].c_str();
     break;
   case atrt_process::AP_CLIENT:
-    buf[0].assfmt("client.%d%s", idx, cluster.m_name.c_str());
+    buf[0].assfmt("client.%u%s", idx, cluster.m_name.c_str());
     groups[0] = buf[0].c_str();
     break;
   case atrt_process::AP_NDB_API:
@@ -291,15 +291,15 @@ load_process(atrt_config& config, atrt_c
   switch(type){
   case atrt_process::AP_NDB_MGMD:
   {
-    proc.m_proc.m_name.assfmt("%d-%s", proc_no, "ndb_mgmd");
+    proc.m_proc.m_name.assfmt("%u-%s", proc_no, "ndb_mgmd");
     proc.m_proc.m_path.assign(g_prefix).append("/libexec/ndb_mgmd");
     proc.m_proc.m_args.assfmt("--defaults-file=%s/my.cnf",
 			      proc.m_host->m_basedir.c_str());
     proc.m_proc.m_args.appfmt(" --defaults-group-suffix=%s",
 			      cluster.m_name.c_str());
     proc.m_proc.m_args.append(" --nodaemon --mycnf");
-    proc.m_proc.m_args.appfmt(" --ndb-nodeid=%d", proc.m_nodeid);
-    proc.m_proc.m_cwd.assfmt("%sndb_mgmd.%d", dir.c_str(), proc.m_index);
+    proc.m_proc.m_args.appfmt(" --ndb-nodeid=%u", proc.m_nodeid);
+    proc.m_proc.m_cwd.assfmt("%sndb_mgmd.%u", dir.c_str(), proc.m_index);
     proc.m_proc.m_args.appfmt(" --configdir=%s", proc.m_proc.m_cwd.c_str());
     proc.m_proc.m_env.appfmt(" MYSQL_GROUP_SUFFIX=%s", 
 			     cluster.m_name.c_str());
@@ -316,22 +316,22 @@ load_process(atrt_config& config, atrt_c
       proc.m_proc.m_path.assign(g_prefix).append("/libexec/ndbmtd");
     }
     
-    proc.m_proc.m_name.assfmt("%d-%s", proc_no, "ndbd");
+    proc.m_proc.m_name.assfmt("%u-%s", proc_no, "ndbd");
     proc.m_proc.m_args.assfmt("--defaults-file=%s/my.cnf",
 			      proc.m_host->m_basedir.c_str());
     proc.m_proc.m_args.appfmt(" --defaults-group-suffix=%s",
 			      cluster.m_name.c_str());
     proc.m_proc.m_args.append(" --nodaemon --initial -n");
     if (g_fix_nodeid)
-      proc.m_proc.m_args.appfmt(" --ndb-nodeid=%d", proc.m_nodeid);
-    proc.m_proc.m_cwd.assfmt("%sndbd.%d", dir.c_str(), proc.m_index);
+      proc.m_proc.m_args.appfmt(" --ndb-nodeid=%u", proc.m_nodeid);
+    proc.m_proc.m_cwd.assfmt("%sndbd.%u", dir.c_str(), proc.m_index);
     proc.m_proc.m_env.appfmt(" MYSQL_GROUP_SUFFIX=%s", 
 			     cluster.m_name.c_str());
     break;
   } 
   case atrt_process::AP_MYSQLD:
   {
-    proc.m_proc.m_name.assfmt("%d-%s", proc_no, "mysqld");
+    proc.m_proc.m_name.assfmt("%u-%s", proc_no, "mysqld");
     proc.m_proc.m_path.assign(g_prefix).append("/libexec/mysqld");
     proc.m_proc.m_args.assfmt("--defaults-file=%s/my.cnf",
 			      proc.m_host->m_basedir.c_str());
@@ -341,29 +341,29 @@ load_process(atrt_config& config, atrt_c
     proc.m_proc.m_args.append(" --core-file");
     if (g_fix_nodeid)
       proc.m_proc.m_args.appfmt(" --ndb-nodeid=%d", proc.m_nodeid);
-    proc.m_proc.m_cwd.appfmt("%smysqld.%d", dir.c_str(), proc.m_index);
+    proc.m_proc.m_cwd.appfmt("%smysqld.%u", dir.c_str(), proc.m_index);
     proc.m_proc.m_shutdown_options = "SIGKILL"; // not nice
-    proc.m_proc.m_env.appfmt(" MYSQL_GROUP_SUFFIX=.%d%s", 
+    proc.m_proc.m_env.appfmt(" MYSQL_GROUP_SUFFIX=.%u%s", 
 			     proc.m_index,
 			     cluster.m_name.c_str());
     break;
   } 
   case atrt_process::AP_NDB_API:
   {
-    proc.m_proc.m_name.assfmt("%d-%s", proc_no, "ndb_api");
+    proc.m_proc.m_name.assfmt("%u-%s", proc_no, "ndb_api");
     proc.m_proc.m_path = "";
     proc.m_proc.m_args = "";
-    proc.m_proc.m_cwd.appfmt("%sndb_api.%d", dir.c_str(), proc.m_index);
+    proc.m_proc.m_cwd.appfmt("%sndb_api.%u", dir.c_str(), proc.m_index);
     proc.m_proc.m_env.appfmt(" MYSQL_GROUP_SUFFIX=%s", 
 			     cluster.m_name.c_str());
     break;
   } 
   case atrt_process::AP_CLIENT:
   {
-    proc.m_proc.m_name.assfmt("%d-%s", proc_no, "mysql");
+    proc.m_proc.m_name.assfmt("%u-%s", proc_no, "mysql");
     proc.m_proc.m_path = "";
     proc.m_proc.m_args = "";
-    proc.m_proc.m_cwd.appfmt("%s/client.%d", dir.c_str(), proc.m_index);
+    proc.m_proc.m_cwd.appfmt("%s/client.%u", dir.c_str(), proc.m_index);
     proc.m_proc.m_env.appfmt(" MYSQL_GROUP_SUFFIX=.%d%s", 
 			     proc.m_index,
 			     cluster.m_name.c_str());
@@ -473,7 +473,7 @@ configure(atrt_config& config, int setup
       
       if (f_rules[i].type & atrt_process::AP_CLUSTER)
       {
-	g_logger.debug("applying rule %d to cluster %s", i, 
+	g_logger.debug("applying rule %u to cluster %s", (unsigned)i, 
 		       ctx.m_cluster->m_name.c_str());
 	if (! (* f_rules[i].func)(props, ctx, f_rules[i].extra))
 	  ok = false;
@@ -487,7 +487,7 @@ configure(atrt_config& config, int setup
 	  ctx.m_process = cluster.m_processes[k];
 	  if (proc.m_type & f_rules[i].type)
 	  {
-	    g_logger.debug("applying rule %d to %s", i, 
+	    g_logger.debug("applying rule %u to %s", (unsigned)i, 
 			   proc.m_proc.m_cwd.c_str());
 	    if (! (* f_rules[i].func)(props, ctx, f_rules[i].extra))
 	      ok = false;

=== modified file 'storage/ndb/test/src/HugoCalculator.cpp'
--- a/storage/ndb/test/src/HugoCalculator.cpp	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/test/src/HugoCalculator.cpp	2009-09-25 13:38:00 +0000
@@ -96,7 +96,7 @@ static
 Uint32
 calc_len(Uint32 rvalue, int maxlen)
 {
-  Uint32 minlen = 25;
+  int minlen = 25;
   
   if ((rvalue >> 16) < 4096)
     minlen = 15;
@@ -242,6 +242,8 @@ write_char:
   case NdbDictionary::Column::Blob:
   case NdbDictionary::Column::Undefined:
   case NdbDictionary::Column::Text:
+  case NdbDictionary::Column::Year:
+  case NdbDictionary::Column::Timestamp:
     abort();
     break;
   }

=== modified file 'storage/ndb/test/src/NDBT_Thread.cpp'
--- a/storage/ndb/test/src/NDBT_Thread.cpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/test/src/NDBT_Thread.cpp	2009-09-25 12:49:37 +0000
@@ -50,7 +50,7 @@ NDBT_Thread::create(NDBT_ThreadSet* thre
   assert(m_cond != 0);
 
   char buf[20];
-  sprintf(buf, "NDBT_%04u");
+  sprintf(buf, "NDBT_%04u", (unsigned)thread_no);
   const char* name = strdup(buf);
   assert(name != 0);
 
@@ -77,7 +77,7 @@ NDBT_Thread::~NDBT_Thread()
   }
 }
 
-static void*
+void*
 NDBT_Thread_run(void* arg)
 {
   assert(arg != 0);
@@ -175,7 +175,6 @@ NDBT_ThreadSet::NDBT_ThreadSet(int count
 
 NDBT_ThreadSet::~NDBT_ThreadSet()
 {
-  delete_output();
   for (int n = 0; n < m_count; n++) {
     delete m_thread[n];
     m_thread[n] = 0;
@@ -242,8 +241,8 @@ NDBT_ThreadSet::delete_output()
 {
   for (int n = 0; n < m_count; n++) {
     if (m_thread[n] != 0) {
-      NDBT_Thread& thr = *m_thread[n];
-      thr.delete_output();
+      //NDBT_Thread& thr = *m_thread[n];
+      //thr.delete_output();
     }
   }
 }

=== modified file 'storage/ndb/test/src/UtilTransactions.cpp'
--- a/storage/ndb/test/src/UtilTransactions.cpp	2009-09-15 16:59:09 +0000
+++ b/storage/ndb/test/src/UtilTransactions.cpp	2009-09-25 13:38:00 +0000
@@ -1096,8 +1096,8 @@ UtilTransactions::verifyOrderedIndex(Ndb
 
       if(!null_found)
       {
-	if(iop= pTrans->getNdbIndexScanOperation(indexName, 
-                                                 tab.getName()))
+	if((iop= pTrans->getNdbIndexScanOperation(indexName, 
+                                                  tab.getName())) != 0)
 	{
 	  if(iop->readTuples(NdbScanOperation::LM_CommittedRead, 
 			     parallelism))
@@ -1208,7 +1208,7 @@ int
 UtilTransactions::equal(const NdbDictionary::Table* pTable, 
 			NdbOperation* op, const NDBT_ResultRow& src)
 {
-  for(int a = 0; a<tab.getNoOfColumns(); a++){
+  for(Uint32 a = 0; (int)a<tab.getNoOfColumns(); a++){
     const NdbDictionary::Column* attr = tab.getColumn(a);
     if (attr->getPrimaryKey() == true){
       if (op->equal(attr->getName(), src.attributeStore(a)->aRef()) != 0){
@@ -1240,6 +1240,8 @@ UtilTransactions::getOperation(NdbConnec
 	return pTrans->getNdbIndexOperation(idx->getName(), tab.getName());
       case NdbDictionary::Index::OrderedIndex:
 	return pTrans->getNdbIndexScanOperation(idx->getName(), tab.getName());
+      default:
+        abort();
       }
     }
   case NdbOperation::InsertRequest:
@@ -1252,6 +1254,8 @@ UtilTransactions::getOperation(NdbConnec
       switch(idx->getType()){
       case NdbDictionary::Index::UniqueHashIndex:
 	return pTrans->getNdbIndexOperation(idx->getName(), tab.getName());
+      default:
+        break;
       }
     }
     return pTrans->getNdbOperation(tab.getName());
@@ -1261,6 +1265,8 @@ UtilTransactions::getOperation(NdbConnec
       switch(idx->getType()){
       case NdbDictionary::Index::OrderedIndex:
 	return pTrans->getNdbIndexScanOperation(idx->getName(), tab.getName());
+      default:
+        break;
       }
     }
     return pTrans->getNdbScanOperation(tab.getName());
@@ -1270,9 +1276,13 @@ UtilTransactions::getOperation(NdbConnec
       switch(idx->getType()){
       case NdbDictionary::Index::OrderedIndex:
 	return pTrans->getNdbIndexScanOperation(idx->getName(), tab.getName());
+      default:
+        break;
       }
     }
     return 0;
+  default:
+    abort();
   }
   return 0;
 }

=== modified file 'storage/ndb/test/tools/cpcc.cpp'
--- a/storage/ndb/test/tools/cpcc.cpp	2009-06-11 12:28:55 +0000
+++ b/storage/ndb/test/tools/cpcc.cpp	2009-09-25 13:38:00 +0000
@@ -36,6 +36,7 @@ int connect(Vector<SimpleCpcClient*>&);
 
 class Expression {
 public:
+  virtual ~Expression() {}
   virtual bool evaluate(SimpleCpcClient*, const SimpleCpcClient::Process &)= 0;
 };
 
@@ -45,6 +46,7 @@ int start_stop(const char * cmd, Vector<
 
 class True : public Expression {
 public:
+  virtual ~True() {}
   virtual bool evaluate(SimpleCpcClient*, const SimpleCpcClient::Process & p){
     return true;
   }
@@ -106,6 +108,7 @@ public:
     cmd = c;
     host = 0;
   }
+  virtual ~Operate() {}
   
   virtual bool evaluate(SimpleCpcClient*, const SimpleCpcClient::Process & p);
 };
@@ -117,7 +120,7 @@ public:
   ProcEQ(SimpleCpcClient* h, Uint32 i){
     host = h; id = i;
   }
-
+  virtual ~ProcEQ() {}
   virtual bool evaluate(SimpleCpcClient* c,const SimpleCpcClient::Process & p){
     return p.m_id == (int)id && c == host;
   }
@@ -183,11 +186,11 @@ main(int argc, const char** argv){
   struct getargs args[] = {
     { "cmd", 'c', arg_string, &cmd, "command", "command to run (default ls)" }
     ,{ "name", 'n', arg_string, &name, 
-       "apply command for all processes with name" }
+       "apply command for all processes with name", "" }
     ,{ "group", 'g', arg_string, &group, 
-       "apply command for all processes in group" }
+       "apply command for all processes in group", "" }
     ,{ "owner", 'g', arg_string, &owner,
-       "apply command for all processes with owner" }
+       "apply command for all processes with owner", "" }
     ,{ "long", 'l', arg_flag, &g_settings.m_longl, "long", "long listing"}
     ,{ "usage", '?', arg_flag, &help, "Print help", "" }
     ,{ "ls",  0, arg_flag, &list, "-c list", "list process(es)" }

=== modified file 'storage/ndb/test/tools/restart.cpp'
--- a/storage/ndb/test/tools/restart.cpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/test/tools/restart.cpp	2009-09-25 12:49:37 +0000
@@ -38,8 +38,8 @@ int main(int argc, const char** argv){
 
 
   struct getargs args[] = {
-    { "initial", 'i', arg_flag, &_initial, "Do initial restart"},
-    { "wait", '\0', arg_negative_flag, &_wait, "Wait until restarted(default=true)"},
+    { "initial", 'i', arg_flag, &_initial, "Do initial restart", ""},
+    { "wait", '\0', arg_negative_flag, &_wait, "Wait until restarted(default=true)", ""},
     { "usage", '?', arg_flag, &_help, "Print help", "" }
     
   };


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20090925133800-vqzd6wuxxys5et6q.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (jonas:3041)Jonas Oreland25 Sep