MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:msvensson Date:April 1 2005 10:24am
Subject:bk commit into 5.0 tree (msvensson:1.1851) BUG#9263
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1851 05/04/01 12:24:11 msvensson@neptunus.(none) +6 -0
  BUG#9263 GCC4: -mcpu is depricated, use -mtune or -march instead
  - Changed from -mcpu to -march
  - Added -ansi and -fno-for-scope

  ndb/src/ndbapi/NdbTransaction.cpp
    1.41 05/04/01 12:24:06 msvensson@neptunus.(none) +4 -3
    Fix compile problem with scope of for loop variables found with -fno-for-scope 

  ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
    1.14 05/04/01 12:24:06 msvensson@neptunus.(none) +2 -0
    Fix compile problem found with -ansi ,adding braces around case statements 

  ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp
    1.21 05/04/01 12:24:06 msvensson@neptunus.(none) +17 -15
    Fix compile problem with scope of for loop variables found with -fno-for-scope 

  ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
    1.25 05/04/01 12:24:06 msvensson@neptunus.(none) +15 -2
    Fix compile problem found with -ansi, adding braces around case statements
    Fix compile problem with scope of for loop variables found with -fno-for-scope 

  ndb/src/cw/cpcd/APIService.cpp
    1.7 05/04/01 12:24:06 msvensson@neptunus.(none) +4 -0
    Fix compile problem found with -ansi, adding braces around case statements

  BUILD/SETUP.sh
    1.40 05/04/01 12:24:06 msvensson@neptunus.(none) +4 -4
    Change -mcpu to -arch since -cpu is deprecated in gcc 4
    Adding -ansi so that we early can catch common portability problems such as C++ style comments in C files 
    Adding -fno-for-scope to emulate older compilers.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/bug9263

--- 1.6/ndb/src/cw/cpcd/APIService.cpp	2004-10-21 21:01:55 +02:00
+++ 1.7/ndb/src/cw/cpcd/APIService.cpp	2005-04-01 12:24:06 +02:00
@@ -171,10 +171,12 @@
 
     switch(ctx.m_status){
     case Parser_t::Ok:
+    {
       for(size_t i = 0; i<ctx.m_aliasUsed.size(); i++)
 	ndbout_c("Used alias: %s -> %s", 
 		 ctx.m_aliasUsed[i]->name, ctx.m_aliasUsed[i]->realName);
       break;
+    }
     case Parser_t::NoLine:
     case Parser_t::EmptyLine:
       break;
@@ -204,10 +206,12 @@
 
     switch(ctx.m_status){
     case Parser_t::Ok:
+    {
       for(size_t i = 0; i<ctx.m_aliasUsed.size(); i++)
 	ndbout_c("Used alias: %s -> %s", 
 		 ctx.m_aliasUsed[i]->name, ctx.m_aliasUsed[i]->realName);
       break;
+    }
     case Parser_t::NoLine:
     case Parser_t::EmptyLine:
       break;

--- 1.24/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2005-02-04 14:02:39 +01:00
+++ 1.25/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2005-04-01 12:24:06 +02:00
@@ -10206,6 +10206,7 @@
   }//if
   switch (tabPtr.p->tabUpdateState) {
   case TabRecord::US_LOCAL_CHECKPOINT:
+  {
     jam();
     releaseTabPages(tabPtr.i);
     signal->theData[0] = DihContinueB::ZCHECK_LCP_COMPLETED;
@@ -10216,7 +10217,9 @@
     tabPtr.p->tabLcpStatus = TabRecord::TLS_COMPLETED;
     return;
     break;
+  }
   case TabRecord::US_REMOVE_NODE:
+  {
     jam();
     releaseTabPages(tabPtr.i);
     for (Uint32 fragId = 0; fragId < tabPtr.p->totalfragments; fragId++) {
@@ -10239,7 +10242,9 @@
     sendSignal(reference(), GSN_CONTINUEB, signal, 3, JBB);
     return;
     break;
+  }
   case TabRecord::US_INVALIDATE_NODE_LCP:
+  {
     jam();
     releaseTabPages(tabPtr.i);
     tabPtr.p->tabCopyStatus = TabRecord::CS_IDLE;
@@ -10250,13 +10255,17 @@
     signal->theData[2] = tabPtr.i + 1;
     sendSignal(reference(), GSN_CONTINUEB, signal, 3, JBB);
     return;
+  }
   case TabRecord::US_COPY_TAB_REQ:
+  {
     jam();
     tabPtr.p->tabUpdateState = TabRecord::US_IDLE;
     copyTabReq_complete(signal, tabPtr);
     return;
     break;
+  }
   case TabRecord::US_ADD_TABLE_MASTER:
+  {
     jam();
     releaseTabPages(tabPtr.i);
     tabPtr.p->tabUpdateState = TabRecord::US_IDLE;
@@ -10265,7 +10274,9 @@
     sendSignal(reference(), GSN_CONTINUEB, signal, 2, JBB);
     return;
     break;
+  }
   case TabRecord::US_ADD_TABLE_SLAVE:
+  {
     jam();
     releaseTabPages(tabPtr.i);
     tabPtr.p->tabUpdateState = TabRecord::US_IDLE;
@@ -10274,6 +10285,7 @@
     sendSignal(reference(), GSN_CONTINUEB, signal, 2, JBB);
     return;
     break;
+  }
   default:
     ndbrequire(false);
     return;
@@ -11693,9 +11705,10 @@
 /*************************************************************************/
 void Dbdih::packCrashedReplicas(ReplicaRecordPtr replicaPtr)
 {
+  Uint32 i;
   ndbrequire(replicaPtr.p->noCrashedReplicas > 0);
   ndbrequire(replicaPtr.p->noCrashedReplicas <= 8);
-  for (Uint32 i = 0; i < replicaPtr.p->noCrashedReplicas; i++) {
+  for (i = 0; i < replicaPtr.p->noCrashedReplicas; i++) {
     jam();
     replicaPtr.p->createGci[i] = replicaPtr.p->createGci[i + 1];
     replicaPtr.p->replicaLastGci[i] = replicaPtr.p->replicaLastGci[i + 1];
@@ -11703,7 +11716,7 @@
   replicaPtr.p->noCrashedReplicas--;
 
 #ifdef VM_TRACE
-  for (Uint32 i = 0; i < replicaPtr.p->noCrashedReplicas; i++) {
+  for (i = 0; i < replicaPtr.p->noCrashedReplicas; i++) {
     jam();
     ndbrequire(replicaPtr.p->createGci[i] != 0xF1F1F1F1);
     ndbrequire(replicaPtr.p->replicaLastGci[i] != 0xF1F1F1F1);

--- 1.20/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp	2004-12-17 10:10:08 +01:00
+++ 1.21/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp	2005-04-01 12:24:06 +02:00
@@ -116,6 +116,7 @@
 void
 Dbtux::printNode(Frag& frag, NdbOut& out, TupLoc loc, PrintPar& par)
 {
+  unsigned i;
   if (loc == NullTupLoc) {
     par.m_depth = 0;
     return;
@@ -127,7 +128,7 @@
   // check children
   PrintPar cpar[2];
   ndbrequire(strlen(par.m_path) + 1 < sizeof(par.m_path));
-  for (unsigned i = 0; i <= 1; i++) {
+  for (i = 0; i <= 1; i++) {
     sprintf(cpar[i].m_path, "%s%c", par.m_path, "LR"[i]);
     cpar[i].m_side = i;
     cpar[i].m_depth = 0;
@@ -180,7 +181,7 @@
   }
 #ifdef dbtux_totally_groks_t_trees
   // check missed semi-leaf/leaf merge
-  for (unsigned i = 0; i <= 1; i++) {
+  for (i = 0; i <= 1; i++) {
     if (node.getLink(i) != NullTupLoc &&
         node.getLink(1 - i) == NullTupLoc &&
         // our semi-leaf seems to satify interior minOccup condition
@@ -197,21 +198,21 @@
     memset(data2, DataFillByte, MaxPrefSize << 2);
     readKeyAttrs(frag, node.getMinMax(0), 0, c_searchKey);
     copyAttrs(frag, c_searchKey, data2, tree.m_prefSize);
-    for (unsigned n = 0; n < tree.m_prefSize; n++) {
-      if (data1[n] != data2[n]) {
+    for (i = 0; i < tree.m_prefSize; i++) {
+      if (data1[i] != data2[i]) {
         par.m_ok = false;
         out << par.m_path << sep;
-        out << "inline prefix mismatch word " << n;
-        out << " value " << hex << data1[n];
-        out << " should be " << hex << data2[n] << endl;
+        out << "inline prefix mismatch word " << i;
+        out << " value " << hex << data1[i];
+        out << " should be " << hex << data2[i] << endl;
         break;
       }
     }
   }
   // check ordering within node
-  for (unsigned j = 1; j < node.getOccup(); j++) {
-    const TreeEnt ent1 = node.getEnt(j - 1);
-    const TreeEnt ent2 = node.getEnt(j);
+  for (i = 1; i < node.getOccup(); i++) {
+    const TreeEnt ent1 = node.getEnt(i - 1);
+    const TreeEnt ent2 = node.getEnt(i);
     unsigned start = 0;
     readKeyAttrs(frag, ent1, start, c_searchKey);
     readKeyAttrs(frag, ent2, start, c_entryKey);
@@ -221,11 +222,11 @@
     if (ret != -1) {
       par.m_ok = false;
       out << par.m_path << sep;
-      out << " disorder within node at pos " << j << endl;
+      out << " disorder within node at pos " << i << endl;
     }
   }
   // check ordering wrt subtrees
-  for (unsigned i = 0; i <= 1; i++) {
+  for ( i = 0; i <= 1; i++) {
     if (node.getLink(i) == NullTupLoc)
       continue;
     const TreeEnt ent1 = cpar[i].m_minmax[1 - i];
@@ -245,7 +246,7 @@
   // return values
   par.m_depth = 1 + max(cpar[0].m_depth, cpar[1].m_depth);
   par.m_occup = node.getOccup();
-  for (unsigned i = 0; i <= 1; i++) {
+  for (i = 0; i <= 1; i++) {
     if (node.getLink(i) == NullTupLoc)
       par.m_minmax[i] = node.getMinMax(i);
     else
@@ -331,6 +332,7 @@
 NdbOut&
 operator<<(NdbOut& out, const Dbtux::ScanOp& scan)
 {
+  unsigned i;
   out << "[ScanOp " << hex << &scan;
   out << " [state " << dec << scan.m_state << "]";
   out << " [lockwait " << dec << scan.m_lockwait << "]";
@@ -340,7 +342,7 @@
   out << " [savePointId " << dec << scan.m_savePointId << "]";
   out << " [accLockOp " << hex << scan.m_accLockOp << "]";
   out << " [accLockOps";
-  for (unsigned i = 0; i < scan.m_maxAccLockOps; i++) {
+  for (i = 0; i < scan.m_maxAccLockOps; i++) {
     if (scan.m_accLockOps[i] != RNIL)
       out << " " << hex << scan.m_accLockOps[i];
   }
@@ -350,7 +352,7 @@
   out << " [descending " << dec << scan.m_descending << "]";
   out << " [pos " << scan.m_scanPos << "]";
   out << " [ent " << scan.m_scanEnt << "]";
-  for (unsigned i = 0; i <= 1; i++) {
+  for (i = 0; i <= 1; i++) {
     out << " [bound " << dec << i;
     Dbtux::ScanBound& bound = *scan.m_bound[i];
     Dbtux::ScanBoundIterator iter;

--- 1.13/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp	2005-01-11 23:25:40 +01:00
+++ 1.14/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp	2005-04-01 12:24:06 +02:00
@@ -3853,6 +3853,7 @@
 {
   switch (signal->theData[0]) {
   case 1:
+  {
     infoEvent("creadyDistCom = %d, cpresident = %d\n",
 	      creadyDistCom, cpresident);
     infoEvent("cpresidentAlive = %d, cpresidentCand = %d\n",
@@ -3893,6 +3894,7 @@
 	infoEvent(buf);
       }
     }
+  }
   default:
     ;
   }//switch

--- 1.40/ndb/src/ndbapi/NdbTransaction.cpp	2005-02-16 20:37:01 +01:00
+++ 1.41/ndb/src/ndbapi/NdbTransaction.cpp	2005-04-01 12:24:06 +02:00
@@ -437,11 +437,12 @@
         continue;
 #ifdef VM_TRACE
       unsigned anyway = 0;
-      for (unsigned i = 0; i < theNdb->theNoOfPreparedTransactions; i++)
+      unsigned i;
+      for (i = 0; i < theNdb->theNoOfPreparedTransactions; i++)
         anyway += theNdb->thePreparedTransactionsArray[i] == this;
-      for (unsigned i = 0; i < theNdb->theNoOfSentTransactions; i++)
+      for (i = 0; i < theNdb->theNoOfSentTransactions; i++)
         anyway += theNdb->theSentTransactionsArray[i] == this;
-      for (unsigned i = 0; i < theNdb->theNoOfCompletedTransactions; i++)
+      for (i = 0; i < theNdb->theNoOfCompletedTransactions; i++)
         anyway += theNdb->theCompletedTransactionsArray[i] == this;
       if (anyway) {
         theNdb->printState("execute %x", this);

--- 1.39/BUILD/SETUP.sh	2005-03-05 22:10:03 +01:00
+++ 1.40/BUILD/SETUP.sh	2005-04-01 12:24:06 +02:00
@@ -55,8 +55,8 @@
 
 alpha_cflags="-mcpu=ev6 -Wa,-mev6"	# Not used yet
 amd64_cflags="-DBIG_TABLES"
-pentium_cflags="-mcpu=pentiumpro"
-pentium64_cflags="-mcpu=nocona -m64"
+pentium_cflags="-march=i686"
+pentium64_cflags="-march=nocona -m64"
 ppc_cflags="-mpowerpc -mcpu=powerpc"
 sparc_cflags=""
 
@@ -66,10 +66,10 @@
 # able to backtrace
 reckless_cflags="-O3 -fomit-frame-pointer "
 
-debug_cflags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX"
+debug_cflags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX -ansi"
 debug_extra_cflags="-O1 -Wuninitialized"
 
-base_cxxflags="-felide-constructors -fno-exceptions -fno-rtti"
+base_cxxflags="-felide-constructors -fno-exceptions -fno-rtti -fno-for-scope"
 amd64_cxxflags="-DBIG_TABLES"
 
 base_configs="$prefix_configs --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-readline"
Thread
bk commit into 5.0 tree (msvensson:1.1851) BUG#9263msvensson1 Apr