List:Commits« Previous MessageNext Message »
From:Frazer Clement Date:December 3 2010 5:00pm
Subject:bzr push into mysql-5.1-telco-7.1 branch (frazer:3737 to 3742)
View as plain text  
 3742 Frazer Clement	2010-12-03
      Commit revert of #46914 for special branch

    modified:
      storage/ndb/include/kernel/GlobalSignalNumbers.h
      storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
      storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
      storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
      storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp
      storage/ndb/src/kernel/blocks/suma/Suma.cpp
      storage/ndb/src/kernel/blocks/suma/Suma.hpp
      storage/ndb/src/kernel/blocks/suma/SumaInit.cpp
      storage/ndb/src/kernel/vm/ArrayPool.hpp
 3741 Frazer Clement	2010-12-03
      Incr revno

    modified:
      storage/ndb/MAINTAINERS
 3740 Frazer Clement	2010-12-03
      Incr revno

    modified:
      storage/ndb/MAINTAINERS
 3739 Frazer Clement	2010-12-03
      Incr revno

    modified:
      storage/ndb/MAINTAINERS
 3738 Frazer Clement	2010-12-03
      Incr revno

    modified:
      storage/ndb/MAINTAINERS
 3737 Jonas Oreland	2010-08-13 {clone-mysql-5.1.47-ndb-7.1.6-src-build} [merge]
      ndb - merge 70 to 71

    modified:
      storage/ndb/include/mgmapi/mgmapi_config_parameters.h
      storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
      storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
      storage/ndb/src/mgmsrv/ConfigInfo.cpp
=== modified file 'storage/ndb/include/kernel/GlobalSignalNumbers.h'
--- a/storage/ndb/include/kernel/GlobalSignalNumbers.h	2010-06-28 08:40:27 +0000
+++ b/storage/ndb/include/kernel/GlobalSignalNumbers.h	2010-12-03 16:59:24 +0000
@@ -191,7 +191,7 @@ extern const GlobalSignalNumber NO_OF_SI
 /* 120 not unused */
 #define GSN_ROUTE_ORD                   121
 #define GSN_NODE_VERSION_REP            122
-/* 123 not unused */
+/* 123 unused */
 /* 124 unused */
 #define GSN_CHECK_LCP_STOP              125
 #define GSN_CLOSE_COMCONF               126 /* local */
@@ -673,7 +673,6 @@ extern const GlobalSignalNumber NO_OF_SI
 #define GSN_TCINDXNEXTCONF              525
 #define GSN_TCINDXNEXREF                526
 #define GSN_FIRE_TRIG_ORD               527
-#define GSN_FIRE_TRIG_ORD_L             123 /* local from TUP to SUMA */
 
 /**
  * These are used only by kernel

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2010-07-04 16:28:36 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2010-12-03 16:59:24 +0000
@@ -13893,9 +13893,8 @@ void
 Dblqh::execSUB_GCP_COMPLETE_REP(Signal* signal)
 {
   jamEntry();
-  Uint32 len = signal->getLength();
-  EXECUTE_DIRECT(DBTUP, GSN_SUB_GCP_COMPLETE_REP, signal, len);
-  sendSignal(SUMA_REF, GSN_SUB_GCP_COMPLETE_REP, signal, len, JBB);
+  sendSignal(SUMA_REF, GSN_SUB_GCP_COMPLETE_REP, signal,
+             signal->getLength(), JBB);
 }
 
 /* ------------------------------------------------------------------------- */

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp	2010-07-04 16:28:36 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp	2010-12-03 16:59:24 +0000
@@ -1782,7 +1782,6 @@ private:
   void execFSREMOVECONF(Signal*);
 
   void execDBINFO_SCANREQ(Signal*);
-  void execSUB_GCP_COMPLETE_REP(Signal*);
 
 //------------------------------------------------------------------
 //------------------------------------------------------------------
@@ -2619,6 +2618,15 @@ private:
                     Uint32 noOfAttributes, 
                     Uint32* inBuffer);
 
+  void sendFireTrigOrd(Signal* signal, 
+                       KeyReqStruct *req_struct,
+                       Operationrec * regOperPtr,
+                       TupTriggerData* trigPtr,
+		       Uint32 fragmentId,
+                       Uint32 noPrimKeySignals, 
+                       Uint32 noBeforeSignals, 
+                       Uint32 noAfterSignals);
+
   bool primaryKey(Tablerec* const, Uint32);
 
   // these set terrorCode and return non-zero on error
@@ -2657,18 +2665,6 @@ private:
   void removeTuxEntries(Signal* signal,
                         Tablerec* regTabPtr);
 
-  void ndbmtd_buffer_suma_trigger(Signal* signal, Uint32 len,
-                                  LinearSectionPtr ptr[]);
-  void flush_ndbmtd_suma_buffer(Signal*);
-
-  struct SumaTriggerBuffer
-  {
-    SumaTriggerBuffer() { m_out_of_memory = 0;m_pageId = RNIL; m_freeWords = 0;}
-    Uint32 m_out_of_memory;
-    Uint32 m_pageId;
-    Uint32 m_freeWords;
-  } m_suma_trigger_buffer;
-
 // *****************************************************************
 // Error Handling routines.
 // *****************************************************************

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp	2010-06-15 15:08:55 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp	2010-12-03 16:59:24 +0000
@@ -127,7 +127,6 @@ Dbtup::Dbtup(Block_context& ctx, Uint32 
   addRecSignal(GSN_FSREMOVECONF, &Dbtup::execFSREMOVECONF, true);
 
   addRecSignal(GSN_DROP_FRAG_REQ, &Dbtup::execDROP_FRAG_REQ);
-  addRecSignal(GSN_SUB_GCP_COMPLETE_REP, &Dbtup::execSUB_GCP_COMPLETE_REP);
 
   fragoperrec = 0;
   fragrecord = 0;

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp	2010-06-02 09:14:39 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp	2010-12-03 16:59:24 +0000
@@ -229,16 +229,7 @@ Dbtup::execDROP_TRIG_IMPL_REQ(Signal* si
 
   // Drop trigger
   Uint32 r = dropTrigger(tabPtr.p, req, refToBlock(receiverRef));
-  if (r == 0)
-  {
-    /**
-     * make sure that any trigger data is sent before DROP_TRIG_CONF
-     *   NOTE: This is only needed for SUMA triggers
-     *         (which are the only buffered ones) but it shouldn't
-     *         be too bad to do it for all triggers...
-     */
-    flush_ndbmtd_suma_buffer(signal);
-
+  if (r == 0){
     // Send conf
     DropTrigImplConf* conf = (DropTrigImplConf*)signal->getDataPtrSend();
     conf->senderRef = reference();
@@ -981,7 +972,6 @@ out:
     jam();
     return;
   }
-
 //--------------------------------------------------------------------
 // Now all data for this trigger has been read. It is now time to send
 // the trigger information consisting of two or three sets of TRIG_
@@ -1133,7 +1123,7 @@ out:
     if (executeDirect)
     {
       jam();
-      EXECUTE_DIRECT(refToMain(ref),
+      EXECUTE_DIRECT(refToMain(trigPtr->m_receiverRef),
                      GSN_FIRE_TRIG_ORD,
                      signal,
                      FireTrigOrd::SignalLengthSuma);
@@ -1149,17 +1139,8 @@ out:
       ptr[1].sz = noBeforeWords;
       ptr[2].p = afterBuffer;
       ptr[2].sz = noAfterWords;
-      if (refToMain(ref) == SUMA && (refToInstance(ref) != instance()))
-      {
-        jam();
-        ndbmtd_buffer_suma_trigger(signal, FireTrigOrd::SignalLengthSuma, ptr);
-      }
-      else
-      {
-        jam();
-        sendSignal(ref, GSN_FIRE_TRIG_ORD,
-                   signal, FireTrigOrd::SignalLengthSuma, JBB, ptr, 3);
-      }
+      sendSignal(trigPtr->m_receiverRef, GSN_FIRE_TRIG_ORD,
+                 signal, FireTrigOrd::SignalLengthSuma, JBB, ptr, 3);
     }
     break;
   case (TriggerType::SUBSCRIPTION):
@@ -1171,7 +1152,7 @@ out:
     if (executeDirect)
     {
       jam();
-      EXECUTE_DIRECT(refToMain(ref),
+      EXECUTE_DIRECT(refToMain(trigPtr->m_receiverRef),
                      GSN_FIRE_TRIG_ORD,
                      signal,
                      FireTrigOrd::SignalWithGCILength);
@@ -1189,7 +1170,7 @@ out:
       ptr[1].sz = noBeforeWords;
       ptr[2].p = afterBuffer;
       ptr[2].sz = noAfterWords;
-      sendSignal(ref, GSN_FIRE_TRIG_ORD,
+      sendSignal(trigPtr->m_receiverRef, GSN_FIRE_TRIG_ORD,
                  signal, FireTrigOrd::SignalWithGCILength, JBB, ptr, 3);
     }
     break;
@@ -1422,6 +1403,17 @@ void Dbtup::sendTrigAttrInfo(Signal* sig
   } while (dataLen != dataIndex);
 }
 
+void Dbtup::sendFireTrigOrd(Signal* signal,
+                            KeyReqStruct *req_struct,
+                            Operationrec * const regOperPtr, 
+                            TupTriggerData* const trigPtr, 
+			    Uint32 fragmentId,
+                            Uint32 noPrimKeyWords, 
+                            Uint32 noBeforeValueWords, 
+                            Uint32 noAfterValueWords)
+{
+}
+
 /*
  * Ordered index triggers.
  *
@@ -1624,119 +1616,3 @@ Dbtup::removeTuxEntries(Signal* signal,
     triggerList.next(triggerPtr);
   }
 }
-
-void
-Dbtup::ndbmtd_buffer_suma_trigger(Signal * signal,
-                                  Uint32 len,
-                                  LinearSectionPtr sec[3])
-{
-  jam();
-  Uint32 tot = len + 5;
-  for (Uint32 i = 0; i<3; i++)
-    tot += sec[i].sz;
-
-  Uint32 * ptr = 0;
-  Uint32 free = m_suma_trigger_buffer.m_freeWords;
-  Uint32 pageId = m_suma_trigger_buffer.m_pageId;
-  Uint32 oom = m_suma_trigger_buffer.m_out_of_memory;
-  if (free < tot)
-  {
-    jam();
-    if (pageId != RNIL)
-    {
-      flush_ndbmtd_suma_buffer(signal);
-    }
-    if (oom == 0)
-    {
-      jam();
-      ndbassert(m_suma_trigger_buffer.m_pageId == RNIL);
-      void * vptr = m_ctx.m_mm.alloc_page(RT_DBTUP_PAGE,
-                                          &m_suma_trigger_buffer.m_pageId,
-                                          Ndbd_mem_manager::NDB_ZONE_ANY);
-      ptr = reinterpret_cast<Uint32*>(vptr);
-      free = GLOBAL_PAGE_SIZE_WORDS - tot;
-    }
-  }
-  else
-  {
-    jam();
-    ptr = reinterpret_cast<Uint32*>(c_page_pool.getPtr(pageId));
-    ptr += (GLOBAL_PAGE_SIZE_WORDS - free);
-    free -= tot;
-  }
-
-  if (likely(ptr != 0))
-  {
-    jam();
-    * ptr++ = tot;
-    * ptr++ = len;
-    * ptr++ = sec[0].sz;
-    * ptr++ = sec[1].sz;
-    * ptr++ = sec[2].sz;
-    memcpy(ptr, signal->getDataPtrSend(), 4 * len);
-    ptr += len;
-    for (Uint32 i = 0; i<3; i++)
-    {
-      memcpy(ptr, sec[i].p, 4 * sec[i].sz);
-      ptr += sec[i].sz;
-    }
-
-    m_suma_trigger_buffer.m_freeWords = free;
-    if (free < (len + 5))
-    {
-      flush_ndbmtd_suma_buffer(signal);
-    }
-  }
-  else
-  {
-    jam();
-    m_suma_trigger_buffer.m_out_of_memory = 1;
-  }
-}
-
-void
-Dbtup::flush_ndbmtd_suma_buffer(Signal* signal)
-{
-  jam();
-
-  Uint32 pageId = m_suma_trigger_buffer.m_pageId;
-  Uint32 free = m_suma_trigger_buffer.m_freeWords;
-  Uint32 oom = m_suma_trigger_buffer.m_out_of_memory;
-
-  if (pageId != RNIL)
-  {
-    jam();
-    Uint32 save[2];
-    save[0] = signal->theData[0];
-    save[1] = signal->theData[1];
-    signal->theData[0] = pageId;
-    signal->theData[1] =  GLOBAL_PAGE_SIZE_WORDS - free;
-    sendSignal(SUMA_REF, GSN_FIRE_TRIG_ORD_L, signal, 2, JBB);
-
-    signal->theData[0] = save[0];
-    signal->theData[1] = save[1];
-  }
-  else if (oom)
-  {
-    jam();
-    Uint32 save[2];
-    save[0] = signal->theData[0];
-    save[1] = signal->theData[1];
-    signal->theData[0] = RNIL;
-    signal->theData[1] =  0;
-    sendSignal(SUMA_REF, GSN_FIRE_TRIG_ORD_L, signal, 2, JBB);
-
-    signal->theData[0] = save[0];
-    signal->theData[1] = save[1];
-  }
-
-  m_suma_trigger_buffer.m_pageId = RNIL;
-  m_suma_trigger_buffer.m_freeWords = 0;
-  m_suma_trigger_buffer.m_out_of_memory = 0;
-}
-
-void
-Dbtup::execSUB_GCP_COMPLETE_REP(Signal* signal)
-{
-  flush_ndbmtd_suma_buffer(signal);
-}

=== modified file 'storage/ndb/src/kernel/blocks/suma/Suma.cpp'
--- a/storage/ndb/src/kernel/blocks/suma/Suma.cpp	2010-06-14 19:33:54 +0000
+++ b/storage/ndb/src/kernel/blocks/suma/Suma.cpp	2010-12-03 16:59:24 +0000
@@ -3989,67 +3989,6 @@ reformat(Signal* signal, LinearSectionPt
   return sz_2 > 0 ? 3 : 2;
 }
 
-/**
- * Pass entire pages with SUMA-trigger-data from
- *   TUP to SUMA to avoid extensive LongSignalMessage buffer contention
- */
-void
-Suma::execFIRE_TRIG_ORD_L(Signal* signal)
-{
-  jamEntry();
-
-  ndbassert(signal->getNoOfSections() == 0);
-  Uint32 pageId = signal->theData[0];
-  Uint32 len = signal->theData[1];
-
-  if (pageId == RNIL && len == 0)
-  {
-    jam();
-    /**
-     * Out of memory
-     */
-    out_of_buffer(signal);
-    return;
-  }
-
-  Uint32 * ptr = reinterpret_cast<Uint32*>(c_page_pool.getPtr(pageId));
-  while (len)
-  {
-    Uint32 * save = ptr;
-    Uint32 msglen  = * ptr++;
-    Uint32 siglen  = * ptr++;
-    Uint32 sec0len = * ptr++;
-    Uint32 sec1len = * ptr++;
-    Uint32 sec2len = * ptr++;
-
-    /**
-     * Copy value directly into local buffers
-     */
-    Uint32 trigId = ((FireTrigOrd*)ptr)->getTriggerId();
-    memcpy(signal->theData, ptr, 4 * siglen); // signal
-    ptr += siglen;
-    memcpy(f_buffer, ptr, 4*sec0len);
-    ptr += sec0len;
-    memcpy(b_buffer, ptr, 4*sec1len);
-    ptr += sec1len;
-    memcpy(f_buffer + sec0len, ptr, 4*sec2len);
-    ptr += sec2len;
-
-    f_trigBufferSize = sec0len + sec2len;
-    b_trigBufferSize = sec1len;
-    f_bufferLock = trigId;
-    b_bufferLock = trigId;
-
-    execFIRE_TRIG_ORD(signal);
-
-    ndbrequire(ptr == save + msglen);
-    ndbrequire(len >= msglen);
-    len -= msglen;
-  }
-
-  m_ctx.m_mm.release_page(RT_DBTUP_PAGE, pageId);
-}
-
 void
 Suma::execFIRE_TRIG_ORD(Signal* signal)
 {
@@ -4120,8 +4059,7 @@ Suma::execFIRE_TRIG_ORD(Signal* signal)
     
     LinearSectionPtr ptr[3];
     const Uint32 nptr= reformat(signal, ptr, 
-				f_buffer, f_trigBufferSize,
-                                b_buffer, b_trigBufferSize);
+				f_buffer, sz, b_buffer, b_trigBufferSize);
     Uint32 ptrLen= 0;
     for(Uint32 i =0; i < nptr; i++)
       ptrLen+= ptr[i].sz;    

=== modified file 'storage/ndb/src/kernel/blocks/suma/Suma.hpp'
--- a/storage/ndb/src/kernel/blocks/suma/Suma.hpp	2010-05-27 09:56:43 +0000
+++ b/storage/ndb/src/kernel/blocks/suma/Suma.hpp	2010-12-03 16:59:24 +0000
@@ -87,7 +87,6 @@ public:
    */
   void execTRIG_ATTRINFO(Signal* signal);
   void execFIRE_TRIG_ORD(Signal* signal);
-  void execFIRE_TRIG_ORD_L(Signal* signal);
   void execSUB_GCP_COMPLETE_REP(Signal* signal);
   
   /**

=== modified file 'storage/ndb/src/kernel/blocks/suma/SumaInit.cpp'
--- a/storage/ndb/src/kernel/blocks/suma/SumaInit.cpp	2010-02-18 06:30:45 +0000
+++ b/storage/ndb/src/kernel/blocks/suma/SumaInit.cpp	2010-12-03 16:59:24 +0000
@@ -115,7 +115,6 @@ Suma::Suma(Block_context& ctx) :
    */
   addRecSignal(GSN_TRIG_ATTRINFO, &Suma::execTRIG_ATTRINFO);
   addRecSignal(GSN_FIRE_TRIG_ORD, &Suma::execFIRE_TRIG_ORD);
-  addRecSignal(GSN_FIRE_TRIG_ORD_L, &Suma::execFIRE_TRIG_ORD_L);
 
   addRecSignal(GSN_CREATE_TRIG_IMPL_REF, &Suma::execCREATE_TRIG_IMPL_REF);
   addRecSignal(GSN_CREATE_TRIG_IMPL_CONF, &Suma::execCREATE_TRIG_IMPL_CONF);

=== modified file 'storage/ndb/src/kernel/vm/ArrayPool.hpp'
--- a/storage/ndb/src/kernel/vm/ArrayPool.hpp	2010-02-18 06:30:45 +0000
+++ b/storage/ndb/src/kernel/vm/ArrayPool.hpp	2010-12-03 16:59:24 +0000
@@ -83,7 +83,7 @@ public:
   }
 
   inline void decNoFree(Uint32 cnt) {
-    assert(noOfFree >= cnt);
+    assert(noOfFree > cnt);
     noOfFree -= cnt;
     updateFreeMin();
   }


Attachment: [text/bzr-bundle] bzr/frazer@mysql.com-20101203165924-ojy4s9mjystk9v5n.bundle
Thread
bzr push into mysql-5.1-telco-7.1 branch (frazer:3737 to 3742) Frazer Clement3 Dec