List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:November 3 2008 8:38am
Subject:bzr push into mysql-5.1 branch (jonas:3031 to 3034)
View as plain text  
 3034 Jonas Oreland	2008-11-03
      ndb - kill windoze warnings
modified:
  storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
  storage/ndb/src/kernel/vm/DynArr256.cpp
  storage/ndb/test/ndbapi/testMgm.cpp
  storage/ndb/test/ndbapi/testNodeRestart.cpp
  storage/ndb/test/ndbapi/testScanFilter.cpp
  storage/ndb/test/ndbapi/test_event_merge.cpp

 3033 Jonas Oreland	2008-11-03
      ndb - kill windoze warnings
modified:
  storage/ndb/src/mgmsrv/ConfigInfo.cpp

 3032 Jonas Oreland	2008-11-03 [merge]
      merge 63 to 64
modified:
  storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
  storage/ndb/src/mgmsrv/ConfigInfo.cpp

 3031 Jonas Oreland	2008-11-01
      ndb - try to fix compile error on debx86-b
        align code with 6.0 variant
modified:
  strings/longlong2str_asm.c

=== modified file 'storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2008-10-29 09:42:21 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2008-11-03 08:38:27 +0000
@@ -14132,14 +14132,14 @@ void Dbdih::makeNodeGroups(Uint32 nodeAr
 {
   NodeGroupRecordPtr NGPtr;
   NodeRecordPtr mngNodeptr;
-  Uint32 i, j;
+  Uint32 j;
 
   /**-----------------------------------------------------------------------
    * ASSIGN ALL ACTIVE NODES INTO NODE GROUPS. HOT SPARE NODES ARE ASSIGNED 
    * TO NODE GROUP ZNIL
    *-----------------------------------------------------------------------*/
   cnoOfNodeGroups = 0;
-  for (i = 0; nodeArray[i] != RNIL; i++)
+  for (Uint32 i = 0; nodeArray[i] != RNIL; i++)
   {
     jam();
     mngNodeptr.i = nodeArray[i];
@@ -14171,7 +14171,7 @@ void Dbdih::makeNodeGroups(Uint32 nodeAr
       break;
   }
 
-  for (i = 0; nodeArray[i] != RNIL; i++)
+  for (Uint32 i = 0; nodeArray[i] != RNIL; i++)
   {
     jam();
     mngNodeptr.i = nodeArray[i];
@@ -14225,14 +14225,14 @@ void Dbdih::makeNodeGroups(Uint32 nodeAr
   /**
    * Init sysfile
    */
-  for(i = 0; i < MAX_NDB_NODES; i++)
+  for(Uint32 i = 0; i < MAX_NDB_NODES; i++)
   {
     jam();
     Sysfile::setNodeGroup(i, SYSFILE->nodeGroups, NO_NODE_GROUP_ID);
     Sysfile::setNodeStatus(i, SYSFILE->nodeStatus,Sysfile::NS_NotDefined);
   }
 
-  for (i = 0; nodeArray[i] != RNIL; i++)
+  for (Uint32 i = 0; nodeArray[i] != RNIL; i++)
   {
     jam();
     Uint32 nodeId = mngNodeptr.i = nodeArray[i];
@@ -14266,7 +14266,7 @@ void Dbdih::makeNodeGroups(Uint32 nodeAr
                            mngNodeptr.p->activeStatus);
   }
 
-  for (i = 0; i<cnoOfNodeGroups; i++)
+  for (Uint32 i = 0; i<cnoOfNodeGroups; i++)
   {
     jam();
     bool alive = false;
@@ -14283,18 +14283,18 @@ void Dbdih::makeNodeGroups(Uint32 nodeAr
 	alive = true;
 	break;
       }
-    }
 
-    if (!alive)
-    {
-      char buf[255];
-      BaseString::snprintf
-	(buf, sizeof(buf), 
-	 "Illegal initial start, no alive node in nodegroup %u", i);
-      progError(__LINE__, 
-		NDBD_EXIT_INSUFFICENT_NODES,
-		buf);
-      
+      if (!alive)
+      {
+        char buf[255];
+        BaseString::snprintf
+          (buf, sizeof(buf), 
+           "Illegal initial start, no alive node in nodegroup %u", i);
+        progError(__LINE__, 
+                  NDBD_EXIT_INSUFFICENT_NODES,
+                  buf);
+        
+      }
     }
   }
 }//Dbdih::makeNodeGroups()

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp	2008-10-10 09:32:12 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp	2008-11-03 08:34:28 +0000
@@ -318,7 +318,7 @@ pad32(Uint32 bytepos, Uint32 bitsused)
   {
     assert((bytepos & 3) == 0);
   }
-  Uint32 ret = 4 * ((bitsused + 31 >> 5)) +
+  Uint32 ret = 4 * ((bitsused + 31) >> 5) +
     ((bytepos + 3) & ~(Uint32)3);
   return ret;
 }

=== modified file 'storage/ndb/src/kernel/vm/DynArr256.cpp'
--- a/storage/ndb/src/kernel/vm/DynArr256.cpp	2007-08-23 13:31:26 +0000
+++ b/storage/ndb/src/kernel/vm/DynArr256.cpp	2008-11-03 08:38:27 +0000
@@ -323,7 +323,7 @@ DynArr256::expand(Uint32 pos)
   
   alloc[idx] = m_head.m_ptr_i;
   m_head.m_sz = 1;
-  for (Uint32 i = 0; i<idx; i++)
+  for (i = 0; i<idx; i++)
   {
     m_head.m_ptr_i = alloc[i];
     Uint32 * ptr = get(0);

=== modified file 'storage/ndb/src/mgmsrv/ConfigInfo.cpp'
--- a/storage/ndb/src/mgmsrv/ConfigInfo.cpp	2008-10-29 17:02:11 +0000
+++ b/storage/ndb/src/mgmsrv/ConfigInfo.cpp	2008-11-03 08:36:33 +0000
@@ -4209,8 +4209,8 @@ add_node_connections(Vector<ConfigInfo::
     if(!tmp->get("NodeId2", &nodeId2)) continue;
     p_connections.put("", nodeId2, nodeId2);
 
-    p_connections2.put("", nodeId1 + nodeId2<<16, nodeId1);
-    p_connections2.put("", nodeId2 + nodeId1<<16, nodeId2);
+    p_connections2.put("", nodeId1 + (nodeId2<<16), nodeId1);
+    p_connections2.put("", nodeId2 + (nodeId1<<16), nodeId2);
   }
 
   Uint32 nNodes;
@@ -4243,7 +4243,7 @@ add_node_connections(Vector<ConfigInfo::
   for (i= 0; p_db_nodes.get("", i, &nodeId1); i++){
     for (Uint32 j= i+1;; j++){
       if(!p_db_nodes.get("", j, &nodeId2)) break;
-      if(!p_connections2.get("", nodeId1+nodeId2<<16, &dummy)) 
+      if(!p_connections2.get("", nodeId1+(nodeId2<<16), &dummy)) 
       {
 	if (!add_a_connection(sections,ctx,nodeId1,nodeId2,opt_ndb_shm))
 	  goto err;
@@ -4277,7 +4277,7 @@ add_node_connections(Vector<ConfigInfo::
   for (i= 0; p_mgm_nodes.get("", i, &nodeId1); i++){
     for (Uint32 j= i+1;; j++){
       if(!p_mgm_nodes.get("", j, &nodeId2)) break;
-      if(!p_connections2.get("", nodeId1+nodeId2<<16, &dummy))
+      if(!p_connections2.get("", nodeId1+(nodeId2<<16), &dummy))
       {
 	if (!add_a_connection(sections,ctx,nodeId1,nodeId2,0))
 	  goto err;

=== modified file 'storage/ndb/test/ndbapi/testMgm.cpp'
--- a/storage/ndb/test/ndbapi/testMgm.cpp	2008-10-06 09:49:27 +0000
+++ b/storage/ndb/test/ndbapi/testMgm.cpp	2008-11-03 08:38:27 +0000
@@ -701,7 +701,7 @@ int getMgmLogInfo(NdbMgmHandle h, off_t 
   NdbMgmd mgmd;
 
   const char *mgm= mgmd.getConnectString();
-  int i, r, ncol;
+  int r, ncol;
   char rowbuf[1024];
   char **cols;
   int current_size_colnum= 0;
@@ -718,7 +718,7 @@ int getMgmLogInfo(NdbMgmHandle h, off_t 
 
   ndb_mgm_ndbinfo_getcolums(h,ncol,100,cols);
 
-  for(i=0;i<ncol;i++)
+  for(int i=0;i<ncol;i++)
   {
     if(strcmp(cols[i],"CURRENT_SIZE")==0)
       current_size_colnum= i;

=== modified file 'storage/ndb/test/ndbapi/testNodeRestart.cpp'
--- a/storage/ndb/test/ndbapi/testNodeRestart.cpp	2008-10-28 11:00:17 +0000
+++ b/storage/ndb/test/ndbapi/testNodeRestart.cpp	2008-11-03 08:38:27 +0000
@@ -1469,7 +1469,6 @@ runBug26481(NDBT_Context* ctx, NDBT_Step
 int 
 runBug26450(NDBT_Context* ctx, NDBT_Step* step)
 {
-  Uint32 i;
   NdbRestarter res;
   Ndb* pNdb = GETNDB(step);
   
@@ -1497,7 +1496,7 @@ runBug26450(NDBT_Context* ctx, NDBT_Step
   if (runClearTable(ctx, step))
     return NDBT_FAILED;
 
-  for (i = 0; i < 2; i++)
+  for (int i = 0; i < 2; i++)
   {
     if (res.restartAll(false, true, i > 0))
       return NDBT_FAILED;

=== modified file 'storage/ndb/test/ndbapi/testScanFilter.cpp'
--- a/storage/ndb/test/ndbapi/testScanFilter.cpp	2008-10-07 06:00:54 +0000
+++ b/storage/ndb/test/ndbapi/testScanFilter.cpp	2008-11-03 08:38:27 +0000
@@ -709,13 +709,14 @@ void ndbapi_tuples(Ndb *ndb, char *str, 
     ERR_EXIT(dict, "Can't get table"TABLE_NAME);
 	
 	const NdbDictionary::Column *col[COL_LEN];
-  for(int i = 0; i < COL_LEN; i++)
+
+  for(int ii = 0; ii < COL_LEN; ii++)
   {
     char tmp[128];
-    col[i] = table->getColumn(COL_NAME[i]);
-	  if(!col[i]) 
+    col[ii] = table->getColumn(COL_NAME[ii]);
+	  if(!col[ii]) 
     {
-      BaseString::snprintf(tmp, 128, "Can't get column %s", COL_NAME[i]);
+      BaseString::snprintf(tmp, 128, "Can't get column %s", COL_NAME[ii]);
       ERR_EXIT(dict, tmp);
     }
   }
@@ -736,13 +737,13 @@ void ndbapi_tuples(Ndb *ndb, char *str, 
     ERR_EXIT(scan, "Can't set up read");
   
   NdbRecAttr *rec[COL_LEN];
-  for(int i = 0; i < COL_LEN; i++)
+  for(int ii = 0; ii < COL_LEN; ii++)
   {
     char tmp[128];
-    rec[i] = scan->getValue(COL_NAME[i]);
-	  if(!rec[i]) 
+    rec[ii] = scan->getValue(COL_NAME[ii]);
+	  if(!rec[ii]) 
     {
-      BaseString::snprintf(tmp, 128, "Can't get rec of %s", COL_NAME[i]);
+      BaseString::snprintf(tmp, 128, "Can't get rec of %s", COL_NAME[ii]);
       ERR_EXIT(scan, tmp);
     }
   }

=== modified file 'storage/ndb/test/ndbapi/test_event_merge.cpp'
--- a/storage/ndb/test/ndbapi/test_event_merge.cpp	2008-10-07 06:20:59 +0000
+++ b/storage/ndb/test/ndbapi/test_event_merge.cpp	2008-11-03 08:38:27 +0000
@@ -1684,6 +1684,7 @@ 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++) {
     Run& r = run(i);
     for (pk1 = 0; pk1 < g_opts.maxpk; pk1++) {
@@ -1702,9 +1703,9 @@ runops()
       left++;
     }
   }
-  uint i;
+
   while (left != 0) {
-    i = urandom(maxrun());
+    unsigned int i = urandom(maxrun());
     pk1 = urandom(g_opts.maxpk);
     if (gci_op[i][pk1] == 0)
       continue;

Thread
bzr push into mysql-5.1 branch (jonas:3031 to 3034) Jonas Oreland3 Nov