List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:June 10 2010 7:35am
Subject:bzr push into mysql-5.1-telco-6.3 branch (jonas:3212 to 3213)
View as plain text  
 3213 Jonas Oreland	2010-06-10
      ndb - kill warnings, this kill all warnings in storage/ndb/src debug-compiled with 4.1.2

    modified:
      storage/ndb/src/common/portlib/NdbThread.c
      storage/ndb/src/common/util/Bitmask.cpp
      storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
      storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
      storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp
      storage/ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp
      storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
      storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
      storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.cpp
      storage/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp
      storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
      storage/ndb/src/kernel/blocks/pgman.cpp
      storage/ndb/src/kernel/blocks/suma/Suma.cpp
      storage/ndb/src/mgmsrv/MgmtSrvr.cpp
      storage/ndb/src/ndbapi/Ndb.cpp
      storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
      storage/ndb/src/ndbapi/NdbInterpretedCode.cpp
 3212 Jonas Oreland	2010-06-10
      ndb - bahh...my_sleep takes micro-seconds as argument...not milli seconds

    modified:
      client/mysqltest.cc
=== modified file 'storage/ndb/src/common/portlib/NdbThread.c'
--- a/storage/ndb/src/common/portlib/NdbThread.c	2010-02-04 14:42:12 +0000
+++ b/storage/ndb/src/common/portlib/NdbThread.c	2010-06-10 07:00:44 +0000
@@ -190,7 +190,7 @@ struct NdbThread* NdbThread_CreateWithFu
   if (thread_stack_size < PTHREAD_STACK_MIN)
     thread_stack_size = PTHREAD_STACK_MIN;
 #endif
-  DBUG_PRINT("info", ("stack_size: %llu", (ulong)thread_stack_size));
+  DBUG_PRINT("info", ("stack_size: %llu", (ulonglong)thread_stack_size));
   pthread_attr_setstacksize(&thread_attr, thread_stack_size);
 #ifdef USE_PTHREAD_EXTRAS
   /* Guard stack overflow with a 2k databuffer */

=== modified file 'storage/ndb/src/common/util/Bitmask.cpp'
--- a/storage/ndb/src/common/util/Bitmask.cpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/common/util/Bitmask.cpp	2010-06-10 07:00:44 +0000
@@ -131,7 +131,6 @@ BitmaskImpl::parseMask(unsigned size, Ui
     list[i].trim();
     if (list[i].empty())
       continue;
-    unsigned num = 0;
     char * delim = (char*)strchr(list[i].c_str(), '-');
     unsigned first = 0;
     unsigned last = 0;

=== modified file 'storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp'
--- a/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2010-01-25 15:36:04 +0000
+++ b/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2010-06-10 07:00:44 +0000
@@ -669,8 +669,8 @@ void Cmvmi::execOPEN_COMREQ(Signal* sign
     }
   }
   
-done:  
-  if (userRef != 0) {
+  if (userRef != 0)
+  {
     jam(); 
     signal->theData[0] = tStartingNode;
     signal->theData[1] = tData2;
@@ -703,7 +703,6 @@ void Cmvmi::execDISCONNECT_REP(Signal *s
 {
   const DisconnectRep * const rep = (DisconnectRep *)&signal->theData[0];
   const Uint32 hostId = rep->nodeId;
-  const Uint32 errNo  = rep->err;
   
   jamEntry();
 

=== modified file 'storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2010-05-24 07:40:34 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2010-06-10 07:00:44 +0000
@@ -111,14 +111,6 @@ extern EventLogger * g_eventLogger;
 
 static
 Uint32
-oldPrevLcpNo(Uint32 lcpNo){
-  if(lcpNo == 0)
-    return MAX_LCP_STORED - 1;
-  return lcpNo - 1;
-}
-
-static
-Uint32
 prevLcpNo(Uint32 lcpNo){
   if(lcpNo == 0)
     return MAX_LCP_USED - 1;
@@ -3805,6 +3797,7 @@ Dbdih::execSTART_TOREF(Signal* signal)
 
   StartToRef* ref = (StartToRef*)signal->getDataPtr();
   Uint32 errCode = ref->errorCode;
+  (void)errCode; // TODO check for "valid" error
 
   TakeOverRecordPtr takeOverPtr;
   c_takeOverPool.getPtr(takeOverPtr, ref->senderData);
@@ -4027,6 +4020,7 @@ Dbdih::execUPDATE_TOREF(Signal* signal)
   jamEntry();
   UpdateToRef* ref = (UpdateToRef*)signal->getDataPtr();
   Uint32 errCode = ref->errorCode;
+  (void)errCode; // TODO check for "valid" error
 
   TakeOverRecordPtr takeOverPtr;
   c_takeOverPool.getPtr(takeOverPtr, ref->senderData);
@@ -7417,6 +7411,7 @@ void Dbdih::execDIADDTABREQ(Signal* sign
     Uint16 fragments[2 + MAX_FRAG_PER_NODE*MAX_REPLICAS*MAX_NDB_NODES];
     Uint32 align;
   };
+  (void)align; // kill warning
   SectionHandle handle(this, signal);
   SegmentedSectionPtr fragDataPtr;
   ndbrequire(handle.getSection(fragDataPtr, DiAddTabReq::FRAGMENTATION));
@@ -8447,6 +8442,9 @@ void Dbdih::execGCP_NODEFINISH(Signal* s
   const Uint32 gci_lo = signal->theData[3];
   const Uint64 gci = gci_lo | (Uint64(gci_hi) << 32);
 
+  (void)gci; // TODO validate
+  (void)failureNr; // kill warning
+
   ndbrequire(m_micro_gcp.m_master.m_state == MicroGcp::M_GCP_COMMIT);
   receiveLoopMacro(GCP_COMMIT, senderNodeId);
 
@@ -8495,7 +8493,6 @@ void Dbdih::execGCP_NODEFINISH(Signal* s
   /**
    * New protocol
    */
-  Uint64 now;
   m_micro_gcp.m_master.m_state = MicroGcp::M_GCP_IDLE;
 
   Uint32 curr_hi = m_micro_gcp.m_current_gci >> 32;

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp	2010-03-16 14:51:53 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp	2010-06-10 07:00:44 +0000
@@ -206,6 +206,7 @@ Dbtup::dealloc_tuple(Signal* signal,
   }
 }
 
+#if 0
 static void dump_buf_hex(unsigned char *p, Uint32 bytes)
 {
   char buf[3001];
@@ -223,6 +224,8 @@ static void dump_buf_hex(unsigned char *
   }
   ndbout_c("%8p: %s", p, buf);
 }
+#endif
+
 void
 Dbtup::commit_operation(Signal* signal,
 			Uint32 gci,

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp	2010-02-22 09:44:41 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp	2010-06-10 07:00:44 +0000
@@ -381,8 +381,6 @@ operator<<(NdbOut& out, const Dbtup::Ope
 NdbOut&
 operator<<(NdbOut& out, const Dbtup::Th& th)
 {
-  // ugly
-  Dbtup* tup = (Dbtup*)globalData.getBlock(DBTUP);
   unsigned i = 0;
   out << "[Th " << hex << &th;
   out << " [op " << hex << th.data[i++] << "]";

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp	2010-03-21 12:04:34 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp	2010-06-10 07:00:44 +0000
@@ -1648,7 +1648,6 @@ int Dbtup::handleInsertReq(Signal* signa
   }
   else 
   {
-    int ret;
     if (ERROR_INSERTED(4020))
     {
       goto size_change_error;
@@ -2168,6 +2167,7 @@ int Dbtup::interpreterNextLab(Signal* si
     Uint32 TregMemBuffer[32];
     Uint64 align[16];
   };
+  (void)align; // kill warning
   Uint32 TstackMemBuffer[32];
 
   /* ---------------------------------------------------------------- */
@@ -3059,7 +3059,7 @@ Dbtup::dump_tuple(const KeyReqStruct* re
 {
   Uint16 mm_vars= tabPtrP->m_attributes[MM].m_no_of_varsize;
   Uint16 mm_dyns= tabPtrP->m_attributes[MM].m_no_of_dynamic;
-  Uint16 dd_tot= tabPtrP->m_no_of_disk_attributes;
+  //Uint16 dd_tot= tabPtrP->m_no_of_disk_attributes;
   const Tuple_header* ptr= req_struct->m_tuple_ptr;
   Uint32 bits= ptr->m_header_bits;
   const Uint32 *tuple_words= (Uint32 *)ptr;
@@ -3067,8 +3067,8 @@ Dbtup::dump_tuple(const KeyReqStruct* re
   Uint32 fix_len;
   const Uint32 *var_p;
   Uint32 var_len;
-  const Uint32 *disk_p;
-  Uint32 disk_len;
+  //const Uint32 *disk_p;
+  //Uint32 disk_len;
   const char *typ;
 
   fix_p= tuple_words;
@@ -3088,7 +3088,7 @@ Dbtup::dump_tuple(const KeyReqStruct* re
     typ= "stored";
     if(mm_vars+mm_dyns)
     {
-      const KeyReqStruct::Var_data* dst= &req_struct->m_var_data[MM];
+      //const KeyReqStruct::Var_data* dst= &req_struct->m_var_data[MM];
       const Var_part_ref *varref= ptr->get_var_part_ref_ptr(tabPtrP);
       Ptr<Page> tmp;
       var_p= get_ptr(&tmp, * varref);

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp	2009-12-14 10:58:03 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp	2010-06-10 07:00:44 +0000
@@ -38,7 +38,7 @@ Dbtup::setUpQueryRoutines(Tablerec *regT
     Uint32 attrDescr= tableDescriptor[attrDescrStart].tabDescr;
     Uint32 attrOffset= tableDescriptor[attrDescrStart + 1].tabDescr;
 
-    Uint32 type = AttributeDescriptor::getType(attrDescr);
+    //Uint32 type = AttributeDescriptor::getType(attrDescr);
     Uint32 array = AttributeDescriptor::getArrayType(attrDescr);
     Uint32 charset = AttributeOffset::getCharsetFlag(attrOffset);
     Uint32 size = AttributeDescriptor::getSize(attrDescr);
@@ -283,6 +283,7 @@ Dbtup::setUpQueryRoutines(Tablerec *regT
   }
 }
 
+#if 0
 /* Dump a byte buffer, for debugging. */
 static void dump_buf_hex(unsigned char *p, Uint32 bytes)
 {
@@ -301,6 +302,7 @@ static void dump_buf_hex(unsigned char *
   }
   ndbout_c("%8p: %s", p, buf);
 }
+#endif
 
 static
 inline

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.cpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.cpp	2010-06-10 07:00:44 +0000
@@ -56,7 +56,6 @@ Undo_buffer::alloc_copy_tuple(Local_key*
   assert(words);
   if(m_first_free == RNIL)
   {
-    Uint32 count;
     page= (UndoPage*)m_mm->alloc_page(RG_DATAMEM, 
                                       &m_first_free,
                                       Ndbd_mem_manager::NDB_ZONE_ANY);

=== modified file 'storage/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp	2009-12-15 15:37:38 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp	2010-06-10 07:00:44 +0000
@@ -341,7 +341,6 @@ Dbtux::execALTER_INDX_REQ(Signal* signal
   IndexPtr indexPtr;
   c_indexPool.getPtr(indexPtr, req->getIndexId());
 
-  Uint32 save = indexPtr.p->m_state;
   if (refToBlock(req->getUserRef()) != DBDICT)
   {
     /**

=== modified file 'storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp'
--- a/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp	2010-05-24 08:01:54 +0000
+++ b/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp	2010-06-10 07:00:44 +0000
@@ -39,8 +39,6 @@
 #include <NdbOut.hpp>
 #include <Configuration.hpp>
 
-#define DEBUG(x) { ndbout << "FS::" << x << endl; }
-
 inline
 int pageSize( const NewVARIABLE* baseAddrRef )
 {

=== modified file 'storage/ndb/src/kernel/blocks/pgman.cpp'
--- a/storage/ndb/src/kernel/blocks/pgman.cpp	2009-12-15 15:37:38 +0000
+++ b/storage/ndb/src/kernel/blocks/pgman.cpp	2010-06-10 07:00:44 +0000
@@ -2296,7 +2296,6 @@ Pgman::dump_page_lists(Uint32 ptrI)
   if (ptrI != RNIL)
     debugOut << "PGMAN: error on PE [" << ptrI << "]" << "\n";
 
-  Page_hashlist& pl_hash = m_page_hashlist;
   Page_stack& pl_stack = m_page_stack;
   Page_queue& pl_queue = m_page_queue;
   Ptr<Page_entry> ptr;

=== modified file 'storage/ndb/src/kernel/blocks/suma/Suma.cpp'
--- a/storage/ndb/src/kernel/blocks/suma/Suma.cpp	2010-05-27 08:51:31 +0000
+++ b/storage/ndb/src/kernel/blocks/suma/Suma.cpp	2010-06-10 07:00:44 +0000
@@ -1792,9 +1792,9 @@ Suma::execSUB_SYNC_REQ(Signal* signal)
     return;
   }
 
-  bool ok = false;
   SubscriptionData::Part part = (SubscriptionData::Part)req->part;
-  
+  (void)part; // TODO check for valid part
+
   Ptr<SyncRecord> syncPtr;
   LocalDLList<SyncRecord> list(c_syncPool, subPtr.p->m_syncRecords);
   if(!list.seize(syncPtr))
@@ -2399,6 +2399,7 @@ Suma::execSUB_START_REQ(Signal* signal){
   Uint32 subscriberData       = req->subscriberData;
   Uint32 subscriberRef        = req->subscriberRef;
   SubscriptionData::Part part = (SubscriptionData::Part)req->part;
+  (void)part; // TODO validate part
 
   Subscription key; 
   key.m_subscriptionId        = req->subscriptionId;
@@ -2605,7 +2606,7 @@ Suma::execCREATE_TRIG_CONF(Signal* signa
   CreateTrigConf * conf = (CreateTrigConf*)signal->getDataPtr();
   const Uint32 triggerId = conf->getTriggerId();
   Uint32 type = (triggerId >> 16) & 0x3;
-  Uint32 tableId = conf->getTableId();
+  //Uint32 tableId = conf->getTableId();
 
   TablePtr tabPtr;
   SubscriptionPtr subPtr;
@@ -2653,7 +2654,7 @@ Suma::execCREATE_TRIG_REF(Signal* signal
   CreateTrigRef * const ref = (CreateTrigRef*)signal->getDataPtr();
   const Uint32 triggerId = ref->getTriggerId();
   Uint32 type = (triggerId >> 16) & 0x3;
-  Uint32 tableId = ref->getTableId();
+  //Uint32 tableId = ref->getTableId();
 
   TablePtr tabPtr;
   SubscriptionPtr subPtr;

=== modified file 'storage/ndb/src/mgmsrv/MgmtSrvr.cpp'
--- a/storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2010-03-16 14:51:53 +0000
+++ b/storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2010-06-10 07:00:44 +0000
@@ -3251,6 +3251,7 @@ MgmtSrvr::request_events(NdbNodeBitmask 
       const NodeId nodeid = refToNode(signal->header.theSendersBlockRef);
       const EventReport * const event =
         (const EventReport*)signal->getDataPtr();
+      (void)event; // kill warning
 
       if (!nodes.get(nodeid))
       {

=== modified file 'storage/ndb/src/ndbapi/Ndb.cpp'
--- a/storage/ndb/src/ndbapi/Ndb.cpp	2009-12-08 12:10:58 +0000
+++ b/storage/ndb/src/ndbapi/Ndb.cpp	2010-06-10 07:00:44 +0000
@@ -1882,8 +1882,6 @@ int Ndb::dropEventOperation(NdbEventOper
   DBUG_ENTER("Ndb::dropEventOperation");
   DBUG_PRINT("info", ("name: %s", tOp->getEvent()->getTable()->getName()));
   // remove it from list
-  NdbEventOperationImpl *op=
-    NdbEventBuffer::getEventOperationImpl(tOp);
   
   theEventBuffer->dropEventOperation(tOp);
   DBUG_RETURN(0);

=== modified file 'storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp'
--- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2010-05-27 08:51:31 +0000
+++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2010-06-10 07:00:44 +0000
@@ -1801,12 +1801,12 @@ NdbDictionaryImpl::NdbDictionaryImpl(Ndb
 #ifdef VM_TRACE
   // replace by STATIC_ASSERT in 7.x
   assert(
-    WarnUndobufferRoundUp == CreateFilegroupConf::WarnUndobufferRoundUp &&
-    WarnUndofileRoundDown == CreateFileConf::WarnUndofileRoundDown &&
-    WarnExtentRoundUp == CreateFilegroupConf::WarnExtentRoundUp &&
-    WarnDatafileRoundDown == CreateFileConf::WarnDatafileRoundDown &&
-    WarnDatafileRoundUp == CreateFileConf::WarnDatafileRoundUp
-  );
+         (int)WarnUndobufferRoundUp == (int)CreateFilegroupConf::WarnUndobufferRoundUp &&
+         (int)WarnUndofileRoundDown == (int)CreateFileConf::WarnUndofileRoundDown &&
+         (int)WarnExtentRoundUp == (int)CreateFilegroupConf::WarnExtentRoundUp &&
+         (int)WarnDatafileRoundDown == (int)CreateFileConf::WarnDatafileRoundDown &&
+         (int)WarnDatafileRoundUp == (int)CreateFileConf::WarnDatafileRoundUp
+     );
 #endif
 }
 

=== modified file 'storage/ndb/src/ndbapi/NdbInterpretedCode.cpp'
--- a/storage/ndb/src/ndbapi/NdbInterpretedCode.cpp	2010-03-15 20:44:25 +0000
+++ b/storage/ndb/src/ndbapi/NdbInterpretedCode.cpp	2010-06-10 07:00:44 +0000
@@ -574,24 +574,26 @@ NdbInterpretedCode::branch_col(Uint32 br
 
   /* Get value byte length rounded up to nearest 32-bit word */
   Uint32 len2 = Interpreter::mod4(sendLen);
-  if((len2 == sendLen) && 
-     (lastWordMask == (Uint32)~0)){
+  if((len2 == sendLen) && (lastWordMask == (Uint32)~0))
+  {
     /* Whole number of 32-bit words */
     DBUG_RETURN(addN((Uint32*)val, len2 >> 2));
-  } else {
-    /* Partial last word */
-    len2 -= 4;
-    if (addN((Uint32*)val, len2 >> 2) != 0)
-      DBUG_RETURN(-1);
-
-    /* Zero insignificant bytes in last word */
-    Uint32 tmp = 0;
-    for (Uint32 i = 0; i < sendLen-len2; i++) {
-      char* p = (char*)&tmp;
-      p[i] = ((char*)val)[len2+i];
-    }
-    DBUG_RETURN(add1((tmp & lastWordMask)));
+  } 
+
+  /** else */
+  /* Partial last word */
+  len2 -= 4;
+  if (addN((Uint32*)val, len2 >> 2) != 0)
+    DBUG_RETURN(-1);
+  
+  /* Zero insignificant bytes in last word */
+  Uint32 tmp = 0;
+  for (Uint32 i = 0; i < sendLen-len2; i++)
+  {
+    char* p = (char*)&tmp;
+    p[i] = ((char*)val)[len2+i];
   }
+  DBUG_RETURN(add1((tmp & lastWordMask)));
 }
 
 int 


Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20100610070044-0h9fb8fjl7q0z3i7.bundle
Thread
bzr push into mysql-5.1-telco-6.3 branch (jonas:3212 to 3213)Jonas Oreland10 Jun