List:Commits« Previous MessageNext Message »
From:Pekka Nousiainen Date:April 22 2011 6:10pm
Subject:bzr push into mysql-5.1-telco-7.0-wl4163 branch (pekka:4330 to 4331)
View as plain text  
 4331 Pekka Nousiainen	2011-04-22 [merge]
      merge to wl4163

    added:
      storage/ndb/test/run-test/conf-blade08.cnf
    modified:
      storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
      storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
      storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
      storage/ndb/src/kernel/blocks/dblqh/DblqhProxy.cpp
      storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
      storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp
      storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
      storage/ndb/src/kernel/blocks/lgman.cpp
      storage/ndb/src/kernel/blocks/ndbfs/AsyncIoThread.hpp
      storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
      storage/ndb/src/kernel/blocks/ndbfs/VoidFs.cpp
      storage/ndb/test/run-test/Makefile.am
 4330 Pekka Nousiainen	2011-04-20 [merge]
      merge

    modified:
      storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
      storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
=== modified file 'storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp	2011-04-15 13:52:53 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp	2011-04-21 09:21:18 +0000
@@ -504,12 +504,12 @@ public:
     Method method;
     Storage tabStorage;
 
-    Uint32 pageRef[8];
+    Uint32 pageRef[32];
 //-----------------------------------------------------------------------------
 // Each entry in this array contains a reference to 16 fragment records in a
 // row. Thus finding the correct record is very quick provided the fragment id.
 //-----------------------------------------------------------------------------
-    Uint32 startFid[MAX_NDB_NODES];
+    Uint32 startFid[MAX_NDB_NODES * MAX_FRAG_PER_NODE / NO_OF_FRAGS_PER_CHUNK];
 
     Uint32 tabFile[2];
     Uint32 connectrec;                                    

=== modified file 'storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2011-04-15 13:52:53 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2011-04-21 09:21:18 +0000
@@ -8768,6 +8768,7 @@ Dbdih::add_fragment_to_table(Ptr<TabReco
   ndbrequire(cremainingfrags >= NO_OF_FRAGS_PER_CHUNK);
   cremainingfrags -= NO_OF_FRAGS_PER_CHUNK;
 
+  ndbrequire(chunks < NDB_ARRAY_SIZE(tabPtr.p->startFid));
   tabPtr.p->startFid[chunks] = fragPtr.i;
   for (Uint32 i = 0; i<NO_OF_FRAGS_PER_CHUNK; i++)
   {
@@ -9128,7 +9129,7 @@ Dbdih::getFragstore(TabRecord * tab,
   Uint32 chunkNo = fragNo >> LOG_NO_OF_FRAGS_PER_CHUNK;
   Uint32 chunkIndex = fragNo & (NO_OF_FRAGS_PER_CHUNK - 1);
   fragPtr.i = tab->startFid[chunkNo] + chunkIndex;
-  if (likely(chunkNo < MAX_NDB_NODES)) {
+  if (likely(chunkNo < NDB_ARRAY_SIZE(tab->startFid))) {
     ptrCheckGuard(fragPtr, TfragstoreFileSize, TfragStore);
     fragptr = fragPtr;
     return;
@@ -9144,6 +9145,7 @@ void Dbdih::allocFragments(Uint32 noOfFr
   for (Uint32 i = 0; i < noOfChunks; i++) {
     jam();
     Uint32 baseFrag = cfirstfragstore;
+    ndbrequire(i < NDB_ARRAY_SIZE(tabPtr.p->startFid));
     tabPtr.p->startFid[i] = baseFrag;
     fragPtr.i = baseFrag;
     ptrCheckGuard(fragPtr, cfragstoreFileSize, fragmentstore);
@@ -9164,6 +9166,7 @@ void Dbdih::releaseFragments(TabRecordPt
   FragmentstorePtr fragPtr;
   for (Uint32 i = 0; i < tabPtr.p->noOfFragChunks; i++) {
     jam();
+    ndbrequire(i < NDB_ARRAY_SIZE(tabPtr.p->startFid));
     Uint32 baseFrag = tabPtr.p->startFid[i];
     fragPtr.i = baseFrag;
     ptrCheckGuard(fragPtr, cfragstoreFileSize, fragmentstore);
@@ -11042,7 +11045,7 @@ void Dbdih::readingTableLab(Signal* sign
   Uint32 noOfStoredPages = pagePtr.p->word[33];
   if (tabPtr.p->noPages < noOfStoredPages) {
     jam();
-    ndbrequire(noOfStoredPages <= 8);
+    ndbrequire(noOfStoredPages <= NDB_ARRAY_SIZE(tabPtr.p->pageRef));
     for (Uint32 i = tabPtr.p->noPages; i < noOfStoredPages; i++) {
       jam();
       allocpage(pagePtr);
@@ -11547,7 +11550,7 @@ void Dbdih::readingTableErrorLab(Signal*
   /* ---------------------------------------------------------------------- */
   /*    READING THIS FILE FAILED. CLOSE IT AFTER RELEASING ALL PAGES.       */
   /* ---------------------------------------------------------------------- */
-  ndbrequire(tabPtr.p->noPages <= 8);
+  ndbrequire(tabPtr.p->noPages <= NDB_ARRAY_SIZE(tabPtr.p->pageRef));
   for (Uint32 i = 0; i < tabPtr.p->noPages; i++) {
     jam();
     releasePage(tabPtr.p->pageRef[i]);
@@ -11596,7 +11599,7 @@ void Dbdih::execCOPY_TABREQ(Signal* sign
     tabPtr.p->schemaVersion = schemaVersion;
     initTableFile(tabPtr);
   }//if
-  ndbrequire(tabPtr.p->noPages < 8);
+  ndbrequire(tabPtr.p->noPages < NDB_ARRAY_SIZE(tabPtr.p->pageRef));
   if (tabPtr.p->noOfWords == 0) {
     jam();
     allocpage(pagePtr);
@@ -11689,7 +11692,7 @@ void Dbdih::readPagesIntoTableLab(Signal
 
 void Dbdih::readPagesIntoFragLab(Signal* signal, RWFragment* rf) 
 {
-  ndbrequire(rf->pageIndex < 8);
+  ndbrequire(rf->pageIndex < NDB_ARRAY_SIZE(rf->rwfTabPtr.p->pageRef));
   rf->rwfPageptr.i = rf->rwfTabPtr.p->pageRef[rf->pageIndex];
   ptrCheckGuard(rf->rwfPageptr, cpageFileSize, pageRecord);
   FragmentstorePtr fragPtr;
@@ -11799,7 +11802,7 @@ void Dbdih::packTableIntoPagesLab(Signal
 /*****************************************************************************/
 void Dbdih::packFragIntoPagesLab(Signal* signal, RWFragment* wf) 
 {
-  ndbrequire(wf->pageIndex < 8);
+  ndbrequire(wf->pageIndex < NDB_ARRAY_SIZE(wf->rwfTabPtr.p->pageRef));
   wf->rwfPageptr.i = wf->rwfTabPtr.p->pageRef[wf->pageIndex];
   ptrCheckGuard(wf->rwfPageptr, cpageFileSize, pageRecord);
   FragmentstorePtr fragPtr;
@@ -12411,7 +12414,7 @@ void Dbdih::copyTableNode(Signal* signal
       return;
     }//if
   }//if
-  ndbrequire(ctn->pageIndex < 8);
+  ndbrequire(ctn->pageIndex < NDB_ARRAY_SIZE(ctn->ctnTabPtr.p->pageRef));
   ctn->ctnPageptr.i = ctn->ctnTabPtr.p->pageRef[ctn->pageIndex];
   ptrCheckGuard(ctn->ctnPageptr, cpageFileSize, pageRecord);
   /**
@@ -12456,7 +12459,7 @@ void Dbdih::copyTableNode(Signal* signal
         jam();
         ctn->wordIndex = 0;
         ctn->pageIndex++;
-        ndbrequire(ctn->pageIndex < 8);
+        ndbrequire(ctn->pageIndex < NDB_ARRAY_SIZE(ctn->ctnTabPtr.p->pageRef));
         ctn->ctnPageptr.i = ctn->ctnTabPtr.p->pageRef[ctn->pageIndex];
         ptrCheckGuard(ctn->ctnPageptr, cpageFileSize, pageRecord);
       }//if
@@ -15345,10 +15348,10 @@ void Dbdih::initTable(TabRecordPtr tabPt
   tabPtr.p->m_dropTab.tabUserRef = 0;
   tabPtr.p->m_dropTab.tabUserPtr = RNIL;
   Uint32 i;
-  for (i = 0; i < MAX_NDB_NODES; i++) {
+  for (i = 0; i < NDB_ARRAY_SIZE(tabPtr.p->startFid); i++) {
     tabPtr.p->startFid[i] = RNIL;
   }//for
-  for (i = 0; i < 8; i++) {
+  for (i = 0; i < NDB_ARRAY_SIZE(tabPtr.p->pageRef); i++) {
     tabPtr.p->pageRef[i] = RNIL;
   }//for
   tabPtr.p->tableType = DictTabInfo::UndefTableType;
@@ -16215,7 +16218,7 @@ Uint32 Dbdih::readPageWord(RWFragment* r
     jam();
     ndbrequire(rf->wordIndex == 2048);
     rf->pageIndex++;
-    ndbrequire(rf->pageIndex < 8);
+    ndbrequire(rf->pageIndex < NDB_ARRAY_SIZE(rf->rwfTabPtr.p->pageRef));
     rf->rwfPageptr.i = rf->rwfTabPtr.p->pageRef[rf->pageIndex];
     ptrCheckGuard(rf->rwfPageptr, cpageFileSize, pageRecord);
     rf->wordIndex = 32;
@@ -16304,11 +16307,16 @@ void Dbdih::readTabfile(Signal* signal,
   signal->theData[3] = ZLIST_OF_PAIRS;
   signal->theData[4] = ZVAR_NO_WORD;
   signal->theData[5] = tab->noPages;
-  for (Uint32 i = 0; i < tab->noPages; i++) {
-    signal->theData[6 + (2 * i)] = tab->pageRef[i];
-    signal->theData[7 + (2 * i)] = i;
-  }//for
-  sendSignal(NDBFS_REF, GSN_FSREADREQ, signal, 22, JBA);
+  Uint32 section[2 * NDB_ARRAY_SIZE(tab->pageRef)];
+  for (Uint32 i = 0; i < tab->noPages; i++)
+  {
+    section[(2 * i) + 0] = tab->pageRef[i];
+    section[(2 * i) + 1] = i;
+  }
+  LinearSectionPtr ptr[3];
+  ptr[0].p = section;
+  ptr[0].sz = 2 * tab->noPages;
+  sendSignal(NDBFS_REF, GSN_FSREADREQ, signal, 6, JBA, ptr, 1);
 }//Dbdih::readTabfile()
 
 void Dbdih::releasePage(Uint32 pageIndex)
@@ -16325,7 +16333,7 @@ void Dbdih::releaseTabPages(Uint32 table
   TabRecordPtr tabPtr;
   tabPtr.i = tableId;
   ptrCheckGuard(tabPtr, ctabFileSize, tabRecord);
-  ndbrequire(tabPtr.p->noPages <= 8);
+  ndbrequire(tabPtr.p->noPages <= NDB_ARRAY_SIZE(tabPtr.p->pageRef));
   for (Uint32 i = 0; i < tabPtr.p->noPages; i++) {
     jam();
     releasePage(tabPtr.p->pageRef[i]);
@@ -17102,7 +17110,7 @@ void Dbdih::writePageWord(RWFragment* wf
     allocpage(wf->rwfPageptr);
     wf->wordIndex = 32;
     wf->pageIndex++;
-    ndbrequire(wf->pageIndex < 8);
+    ndbrequire(wf->pageIndex < NDB_ARRAY_SIZE(wf->rwfTabPtr.p->pageRef));
     wf->rwfTabPtr.p->pageRef[wf->pageIndex] = wf->rwfPageptr.i;
     wf->rwfTabPtr.p->noPages++;
   }//if
@@ -17173,13 +17181,17 @@ void Dbdih::writeTabfile(Signal* signal,
   signal->theData[3] = ZLIST_OF_PAIRS_SYNCH;
   signal->theData[4] = ZVAR_NO_WORD;
   signal->theData[5] = tab->noPages;
-  for (Uint32 i = 0; i < tab->noPages; i++) {
-    jam();
-    signal->theData[6 + (2 * i)] = tab->pageRef[i];
-    signal->theData[7 + (2 * i)] = i;
-  }//for
-  Uint32 length = 6 + (2 * tab->noPages);
-  sendSignal(NDBFS_REF, GSN_FSWRITEREQ, signal, length, JBA);
+
+  Uint32 section[2 * NDB_ARRAY_SIZE(tab->pageRef)];
+  for (Uint32 i = 0; i < tab->noPages; i++)
+  {
+    section[(2 * i) + 0] = tab->pageRef[i];
+    section[(2 * i) + 1] = i;
+  }
+  LinearSectionPtr ptr[3];
+  ptr[0].p = section;
+  ptr[0].sz = 2 * tab->noPages;
+  sendSignal(NDBFS_REF, GSN_FSWRITEREQ, signal, 6, JBA, ptr, 1);
 }//Dbdih::writeTabfile()
 
 void Dbdih::execDEBUG_SIG(Signal* signal) 

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2011-04-20 11:58:16 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2011-04-21 13:45:17 +0000
@@ -16887,7 +16887,7 @@ void Dblqh::execSTART_RECCONF(Signal* si
   default:
     ndbrequire(false);
   }
-  
+
   jam();
   csrExecUndoLogState = EULS_COMPLETED;
 
@@ -16946,7 +16946,16 @@ Dblqh::rebuildOrderedIndexes(Signal* sig
                            LogPartRecord::P_TAIL_PROBLEM, true);
       }
     }
-    
+
+    if (!isNdbMtLqh())
+    {
+      /**
+       * There should be no disk-ops in flight here...check it
+       */
+      signal->theData[0] = 12003;
+      sendSignal(LGMAN_REF, GSN_DUMP_STATE_ORD, signal, 1, JBB);
+    }
+
     StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend();
     conf->startingNodeId = getOwnNodeId();
     conf->senderData = cstartRecReqData;

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhProxy.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhProxy.cpp	2011-02-02 00:40:07 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhProxy.cpp	2011-04-21 13:45:17 +0000
@@ -1238,6 +1238,13 @@ DblqhProxy::sendSTART_RECCONF(Signal* si
 
   if (ss.m_error == 0) {
     jam();
+
+    /**
+     * There should be no disk-ops in flight here...check it
+     */
+    signal->theData[0] = 12003;
+    sendSignal(LGMAN_REF, GSN_DUMP_STATE_ORD, signal, 1, JBB);
+
     StartRecConf* conf = (StartRecConf*)signal->getDataPtrSend();
     conf->startingNodeId = getOwnNodeId();
     conf->senderData = ss.m_req.senderData;

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp	2011-04-20 07:07:02 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp	2011-04-21 05:38:27 +0000
@@ -1661,6 +1661,22 @@ struct TupHeadInfo {
 };
 */
 
+  struct ChangeMask
+  {
+    Uint32 m_cols;
+    Uint32 m_mask[1];
+
+    const Uint32 * end_of_mask() const { return end_of_mask(m_cols); }
+    const Uint32 * end_of_mask(Uint32 cols) const {
+      return m_mask + ((cols + 31) >> 5);
+    }
+
+    Uint32 * end_of_mask() { return end_of_mask(m_cols); }
+    Uint32 * end_of_mask(Uint32 cols) {
+      return m_mask + ((cols + 31) >> 5);
+    }
+  };
+
 // updateAttributes module
   Uint32          terrorCode;
 
@@ -2493,10 +2509,10 @@ private:
   Uint32 get_fix_page_offset(Uint32 page_index, Uint32 tuple_size);
 
   Uint32 decr_tup_version(Uint32 tuple_version);
-  void update_change_mask_info(const Tablerec*, Uint32* dst, const Uint32*src);
-  void set_change_mask_info(const Tablerec*, Uint32* dst);
-  void clear_change_mask_info(const Tablerec*, Uint32* dst);
-  void copy_change_mask_info(const Tablerec*, Uint32* dst, const Uint32* src);
+  void update_change_mask_info(const Tablerec*, ChangeMask* dst, const Uint32*src);
+  void set_change_mask_info(const Tablerec*, ChangeMask* dst);
+  void clear_change_mask_info(const Tablerec*, ChangeMask* dst);
+  void copy_change_mask_info(const Tablerec*, ChangeMask* dst, const ChangeMask * src);
   void set_commit_change_mask_info(const Tablerec*,
                                    KeyReqStruct*,
                                    const Operationrec*);
@@ -3172,9 +3188,9 @@ private:
     bzero(dst, tabPtrP->total_rec_size);
 #endif
     Uint32 count = tabPtrP->m_no_of_attributes;
-    * dst = count;
-    dst += 1 + ((count + 31) >> 5);
-    return (Tuple_header*)dst;
+    ChangeMask * mask = (ChangeMask*)(dst);
+    mask->m_cols = count;
+    return (Tuple_header*)(mask->end_of_mask(count));
   }
 
   Uint32 * get_copy_tuple_raw(const Local_key* ptr) {
@@ -3182,19 +3198,24 @@ private:
   }
 
   Tuple_header * get_copy_tuple(Uint32 * rawptr) {
-    Uint32 masksz = ((* rawptr) + 31) >> 5;
-    return (Tuple_header*)(rawptr + 1 + masksz);
+    return (Tuple_header*)(get_change_mask_ptr(rawptr)->end_of_mask());
+  }
+
+  ChangeMask * get_change_mask_ptr(Uint32 * rawptr) {
+    return (ChangeMask*)(rawptr);
   }
 
   Tuple_header* get_copy_tuple(const Local_key* ptr){
     return get_copy_tuple(get_copy_tuple_raw(ptr));
   }
 
-  Uint32* get_change_mask_ptr(const Tablerec* tabP, Tuple_header* copy_tuple){
-    Uint32 * tmp = (Uint32*)copy_tuple;
-    tmp -= 1 + ((tabP->m_no_of_attributes + 31) >> 5);
-    assert(get_copy_tuple(tmp) == copy_tuple);
-    return tmp + 1;
+  ChangeMask* get_change_mask_ptr(const Tablerec* tabP,Tuple_header* copytuple){
+    Uint32 * raw = (Uint32*)copytuple;
+    Uint32 * tmp = raw - (1 + ((tabP->m_no_of_attributes + 31) >> 5));
+    ChangeMask* mask = (ChangeMask*)tmp;
+    assert(mask->end_of_mask() == raw);
+    assert(get_copy_tuple(tmp) == copytuple);
+    return mask;
   }
 
   /**
@@ -3510,52 +3531,56 @@ bool Dbtup::find_savepoint(OperationrecP
 inline
 void
 Dbtup::update_change_mask_info(const Tablerec* tablePtrP,
-                               Uint32* dst,
+                               ChangeMask* dst,
                                const Uint32 * src)
 {
+  assert(dst->m_cols == tablePtrP->m_no_of_attributes);
+  Uint32 * ptr = dst->m_mask;
   Uint32 len = (tablePtrP->m_no_of_attributes + 31) >> 5;
   for (Uint32 i = 0; i<len; i++)
   {
-    * dst |= *src;
-    dst++;
+    * ptr |= *src;
+    ptr++;
     src++;
   }
 }
 
 inline
 void
-Dbtup::set_change_mask_info(const Tablerec* tablePtrP, Uint32* dst)
+Dbtup::set_change_mask_info(const Tablerec* tablePtrP, ChangeMask* dst)
 {
+  assert(dst->m_cols == tablePtrP->m_no_of_attributes);
   Uint32 len = (tablePtrP->m_no_of_attributes + 31) >> 5;
-  BitmaskImpl::set(len, dst);
+  BitmaskImpl::set(len, dst->m_mask);
 }
 
 inline
 void
-Dbtup::clear_change_mask_info(const Tablerec* tablePtrP, Uint32* dst)
+Dbtup::clear_change_mask_info(const Tablerec* tablePtrP, ChangeMask* dst)
 {
+  assert(dst->m_cols == tablePtrP->m_no_of_attributes);
   Uint32 len = (tablePtrP->m_no_of_attributes + 31) >> 5;
-  BitmaskImpl::clear(len, dst);
+  BitmaskImpl::clear(len, dst->m_mask);
 }
 
 inline
 void
 Dbtup::copy_change_mask_info(const Tablerec* tablePtrP,
-                             Uint32* dst, const Uint32* src)
+                             ChangeMask* dst, const ChangeMask* src)
 {
   Uint32 dst_cols = tablePtrP->m_no_of_attributes;
-  Uint32 src_cols = * src;
-  const Uint32 * src_ptr = src + 1;
+  assert(dst->m_cols == dst_cols);
+  Uint32 src_cols = src->m_cols;
 
   if (dst_cols == src_cols)
   {
-    memcpy(dst, src_ptr, 4 * ((dst_cols + 31) >> 5));
+    memcpy(dst->m_mask, src->m_mask, 4 * ((dst_cols + 31) >> 5));
   }
   else
   {
     ndbassert(dst_cols > src_cols); // drop column not supported
-    memcpy(dst, src_ptr, 4 * ((src_cols + 31) >> 5));
-    BitmaskImpl::setRange((dst_cols + 31) >> 5, dst,
+    memcpy(dst->m_mask, src->m_mask, 4 * ((src_cols + 31) >> 5));
+    BitmaskImpl::setRange((dst_cols + 31) >> 5, dst->m_mask,
                           src_cols,  (dst_cols - src_cols));
   }
 }

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp	2011-04-19 09:01:07 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp	2011-04-21 05:38:27 +0000
@@ -824,16 +824,17 @@ Dbtup::set_commit_change_mask_info(const
   else
   {
     Uint32 * dst = req_struct->changeMask.rep.data;
-    Uint32 * maskptr = get_copy_tuple_raw(&regOperPtr->m_copy_tuple_location);
-    Uint32 cols = * maskptr;
+    Uint32 * rawptr = get_copy_tuple_raw(&regOperPtr->m_copy_tuple_location);
+    ChangeMask * maskptr = get_change_mask_ptr(rawptr);
+    Uint32 cols = maskptr->m_cols;
     if (cols == regTabPtr->m_no_of_attributes)
     {
-      memcpy(dst, maskptr + 1, 4*masklen);
+      memcpy(dst, maskptr->m_mask, 4*masklen);
     }
     else
     {
       ndbassert(regTabPtr->m_no_of_attributes > cols); // no drop column
-      memcpy(dst, maskptr + 1, 4*((cols + 31) >> 5));
+      memcpy(dst, maskptr->m_mask, 4*((cols + 31) >> 5));
       req_struct->changeMask.setRange(cols,
                                       regTabPtr->m_no_of_attributes - cols);
     }

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp	2011-04-19 09:01:07 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp	2011-04-21 05:38:27 +0000
@@ -984,7 +984,7 @@ int Dbtup::handleUpdateReq(Signal* signa
 {
   Tuple_header *dst;
   Tuple_header *base= req_struct->m_tuple_ptr, *org;
-  Uint32 * change_mask_ptr;
+  ChangeMask * change_mask_ptr;
   if ((dst= alloc_copy_tuple(regTabPtr, &operPtrP->m_copy_tuple_location))== 0)
   {
     terrorCode= ZMEM_NOMEM_ERROR;
@@ -1007,7 +1007,7 @@ int Dbtup::handleUpdateReq(Signal* signa
     org= get_copy_tuple(rawptr);
     copy_change_mask_info(regTabPtr,
                           change_mask_ptr,
-                          rawptr);
+                          get_change_mask_ptr(rawptr));
   }
 
   /**

=== modified file 'storage/ndb/src/kernel/blocks/lgman.cpp'
--- a/storage/ndb/src/kernel/blocks/lgman.cpp	2011-02-24 13:39:24 +0000
+++ b/storage/ndb/src/kernel/blocks/lgman.cpp	2011-04-21 13:45:17 +0000
@@ -420,6 +420,34 @@ Lgman::execDUMP_STATE_ORD(Signal* signal
       m_logfile_group_list.next(ptr);
     }
   }
+  if (signal->theData[0] == 12003)
+  {
+    bool crash = false;
+    Ptr<Logfile_group> ptr;
+    for (m_logfile_group_list.first(ptr); !ptr.isNull();
+         m_logfile_group_list.next(ptr))
+    {
+      if (ptr.p->m_callback_buffer_words != 0)
+      {
+        crash = true;
+        break;
+      }
+    }
+
+    if (crash)
+    {
+      ndbout_c("Detected logfile-group with non zero m_callback_buffer_words");
+      signal->theData[0] = 12002;
+      execDUMP_STATE_ORD(signal);
+      ndbrequire(false);
+    }
+#ifdef VM_TRACE
+    else
+    {
+      ndbout_c("Check for non zero m_callback_buffer_words OK!");
+    }
+#endif
+  }
 }
 
 void
@@ -2401,7 +2429,6 @@ Logfile_client::add_entry(const Change*
 	}
 	* (dst - 1) |= File_formats::Undofile::UNDO_NEXT_LSN << 16;
 	ptr.p->m_free_file_words += 2;
-        tot += 2; // for callback_buffer
 	m_lgman->validate_logfile_group(ptr);
       }
       else
@@ -2415,6 +2442,12 @@ Logfile_client::add_entry(const Change*
 	  dst += src[i].len;
 	}
       }
+      /**
+       * for callback_buffer, always allocats 2 extra...
+       *   not knowing if LSN must be added or not
+       */
+      tot += 2;
+
       if (unlikely(! (tot <= callback_buffer)))
       {
         abort();

=== modified file 'storage/ndb/src/kernel/blocks/ndbfs/AsyncIoThread.hpp'
--- a/storage/ndb/src/kernel/blocks/ndbfs/AsyncIoThread.hpp	2011-02-02 00:40:07 +0000
+++ b/storage/ndb/src/kernel/blocks/ndbfs/AsyncIoThread.hpp	2011-04-21 09:21:18 +0000
@@ -80,7 +80,7 @@ public:
 	char *buf;
 	size_t size;
 	off_t offset;
-      } pages[16];
+      } pages[32];
     } readWrite;
     struct {
       const char * buf;

=== modified file 'storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp'
--- a/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp	2011-04-06 12:49:06 +0000
+++ b/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp	2011-04-21 09:21:18 +0000
@@ -548,7 +548,19 @@ Ndbfs::execFSCLOSEREQ(Signal * signal)
 void 
 Ndbfs::readWriteRequest(int action, Signal * signal)
 {
-  const FsReadWriteReq * const fsRWReq = (FsReadWriteReq *)&signal->theData[0];
+  Uint32 theData[25 + 2 * 32];
+  memcpy(theData, signal->theData, 4 * signal->getLength());
+  SectionHandle handle(this, signal);
+  if (handle.m_cnt > 0)
+  {
+    SegmentedSectionPtr secPtr;
+    ndbrequire(handle.getSection(secPtr, 0));
+    ndbrequire(signal->getLength() + secPtr.sz < NDB_ARRAY_SIZE(theData));
+    copy(theData + signal->getLength(), secPtr);
+    releaseSections(handle);
+  }
+
+  const FsReadWriteReq * const fsRWReq = (FsReadWriteReq *)theData;
   Uint16 filePointer =  (Uint16)fsRWReq->filePointer;
   const UintR userPointer = fsRWReq->userPointer; 
   const BlockReference userRef = fsRWReq->userReference;

=== modified file 'storage/ndb/src/kernel/blocks/ndbfs/VoidFs.cpp'
--- a/storage/ndb/src/kernel/blocks/ndbfs/VoidFs.cpp	2011-02-01 23:27:25 +0000
+++ b/storage/ndb/src/kernel/blocks/ndbfs/VoidFs.cpp	2011-04-21 09:21:18 +0000
@@ -163,6 +163,9 @@ VoidFs::execFSWRITEREQ(Signal* signal)
   const Uint32 userRef = req->userReference;
   const Uint32 userPointer = req->userPointer;
 
+  SectionHandle handle(this, signal);
+  releaseSections(handle);
+
   signal->theData[0] = userPointer;
   sendSignal(userRef, GSN_FSWRITECONF, signal, 1, JBB);
 }
@@ -176,6 +179,9 @@ VoidFs::execFSREADREQ(Signal* signal)
   const Uint32 userRef = req->userReference;
   const Uint32 userPointer = req->userPointer;
 
+  SectionHandle handle(this, signal);
+  releaseSections(handle);
+
   signal->theData[0] = userPointer;
   sendSignal(userRef, GSN_FSREADCONF, signal, 1, JBB);
 #if 0

=== modified file 'storage/ndb/test/run-test/Makefile.am'
--- a/storage/ndb/test/run-test/Makefile.am	2011-02-02 00:40:07 +0000
+++ b/storage/ndb/test/run-test/Makefile.am	2011-04-21 05:41:24 +0000
@@ -26,7 +26,9 @@ test_DATA=daily-basic-tests.txt daily-de
           conf-ndbmaster.cnf \
           conf-fimafeng08.cnf conf-dl145a.cnf test-tests.txt conf-test.cnf \
           conf-upgrade.cnf upgrade-tests.txt \
-	  conf-ndb07.cnf conf-fimafeng09.cnf conf-tyr64.cnf conf-techra29.cnf
+	  conf-ndb07.cnf \
+	  conf-fimafeng09.cnf conf-tyr64.cnf conf-techra29.cnf \
+	  conf-blade08.cnf
 
 test_SCRIPTS=atrt-analyze-result.sh atrt-gather-result.sh atrt-setup.sh \
           autotest-run.sh atrt-backtrace.sh

=== added file 'storage/ndb/test/run-test/conf-blade08.cnf'
--- a/storage/ndb/test/run-test/conf-blade08.cnf	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/test/run-test/conf-blade08.cnf	2011-04-20 09:18:09 +0000
@@ -0,0 +1,32 @@
+[atrt]
+basedir = CHOOSE_dir
+baseport = 14000
+clusters = .2node
+
+[ndb_mgmd]
+
+[mysqld]
+skip-innodb
+skip-bdb
+
+[cluster_config.2node]
+ndb_mgmd = CHOOSE_host1
+ndbd = CHOOSE_host2,CHOOSE_host3
+ndbapi= CHOOSE_host1,CHOOSE_host1,CHOOSE_host1
+
+NoOfReplicas = 2
+IndexMemory = 100M 
+DataMemory = 300M
+BackupMemory = 64M
+MaxNoOfConcurrentScans = 100
+MaxNoOfSavedMessages= 1000
+SendBufferMemory = 2M
+NoOfFragmentLogFiles = 4
+FragmentLogFileSize = 64M
+CompressedLCP=1
+CompressedBackup=1
+ODirect=1
+
+SharedGlobalMemory=256M
+InitialLogfileGroup=undo_buffer_size=64M;undofile01.dat:256M;undofile02.dat:128M
+InitialTablespace=datafile01.dat:128M;datafile02.dat:64M

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0-wl4163 branch (pekka:4330 to 4331) Pekka Nousiainen22 Apr