List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:December 3 2012 3:29pm
Subject:bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:5046 to 5047)
View as plain text  
 5047 Jonas Oreland	2012-12-03
      fixes - commit for autotest - attempt 3

    modified:
      storage/ndb/src/kernel/blocks/backup/Backup.cpp
      storage/ndb/src/kernel/blocks/backup/Backup.hpp
      storage/ndb/src/kernel/blocks/backup/BackupInit.cpp
      storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
      storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp
 5046 Jonas Oreland	2012-11-29
      fixes - commit for autotest - attempt 2

    modified:
      storage/ndb/src/kernel/blocks/backup/Backup.cpp
      storage/ndb/src/kernel/blocks/backup/Backup.hpp
      storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
      storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
      storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
      storage/ndb/src/kernel/blocks/dbtup/DbtupStoredProcDef.cpp
      storage/ndb/test/ndbapi/testDict.cpp
=== modified file 'storage/ndb/src/kernel/blocks/backup/Backup.cpp'
--- a/storage/ndb/src/kernel/blocks/backup/Backup.cpp	2012-11-29 14:04:03 +0000
+++ b/storage/ndb/src/kernel/blocks/backup/Backup.cpp	2012-12-03 15:29:35 +0000
@@ -766,16 +766,18 @@ Backup::execDUMP_STATE_ORD(Signal* signa
 
   if (signal->theData[0] == DumpStateOrd::SchemaResourceSnapshot)
   {
-    RSS_AP_SNAPSHOT_SAVE(c_fragmentPool);
+    RSS_AP_SNAPSHOT_SAVE2(c_fragmentPool, rss_c_lcpFragment);
     RSS_AP_SNAPSHOT_SAVE(c_triggerPool);
-    RSS_AP_SNAPSHOT_SAVE(c_objectListPool);
+    RSS_AP_SNAPSHOT_SAVE2(c_objectListPool, rss_c_lcpObjList);
+    RSS_AP_SNAPSHOT_SAVE2(c_tablePool, rss_c_lcpTable);
   }
 
   if (signal->theData[0] == DumpStateOrd::SchemaResourceCheckLeak)
   {
-    RSS_AP_SNAPSHOT_CHECK(c_fragmentPool);
+    RSS_AP_SNAPSHOT_CHECK2(c_fragmentPool, rss_c_lcpFragment);
     RSS_AP_SNAPSHOT_CHECK(c_triggerPool);
-    RSS_AP_SNAPSHOT_CHECK(c_objectListPool);
+    RSS_AP_SNAPSHOT_CHECK2(c_objectListPool, rss_c_lcpObjList);
+    RSS_AP_SNAPSHOT_CHECK2(c_tablePool, rss_c_lcpTable);
   }
 }
 
@@ -5760,6 +5762,12 @@ Backup::execLCP_PREPARE_REQ(Signal* sign
     else
     {
       jam();
+#ifdef ERROR_INSERT
+      ndbrequire(rss_c_lcpFragment);
+      rss_c_lcpFragment--;
+      ndbrequire(rss_c_lcpTable);
+      rss_c_lcpTable--;
+#endif
       tabPtr.p->fragments.release();
       ptr.p->tables.release();
       ptr.p->errorCode = 0;
@@ -5769,8 +5777,19 @@ Backup::execLCP_PREPARE_REQ(Signal* sign
 
   {
     Local_object_list list(c_objectListPool, ptr.p->objectList);
+    if (!list.isEmpty())
+    {
+#ifdef ERROR_INSERT
+      ndbrequire(rss_c_lcpObjList);
+      rss_c_lcpObjList = 0;
+#endif
+    }
     list.release();
+
     ndbrequire(list.append(&req.tableId, 1));
+#ifdef ERROR_INSERT
+    rss_c_lcpObjList++;
+#endif
   }
 
   ndbrequire(ptr.p->tables.seize(tabPtr)); // preallocated
@@ -5785,6 +5804,11 @@ Backup::execLCP_PREPARE_REQ(Signal* sign
   fragPtr.p->scanning = 0;
   fragPtr.p->tableId = req.tableId;
 
+#ifdef ERROR_INSERT
+  rss_c_lcpFragment++;
+  rss_c_lcpTable++;
+#endif
+
   if (req.backupId != ptr.p->backupId)
   {
     jam();
@@ -5819,7 +5843,14 @@ Backup::lcp_close_file_conf(Signal* sign
   FragmentPtr fragPtr;
   tabPtr.p->fragments.getPtr(fragPtr, 0);
   Uint32 fragmentId = fragPtr.p->fragmentId;
-  
+
+#ifdef ERROR_INSERT
+  ndbrequire(rss_c_lcpFragment);
+  rss_c_lcpFragment--;
+  ndbrequire(rss_c_lcpTable);
+  rss_c_lcpTable--;
+#endif
+
   tabPtr.p->fragments.release();
   ptr.p->tables.release();
   ptr.p->errorCode = 0;

=== modified file 'storage/ndb/src/kernel/blocks/backup/Backup.hpp'
--- a/storage/ndb/src/kernel/blocks/backup/Backup.hpp	2012-11-29 14:04:03 +0000
+++ b/storage/ndb/src/kernel/blocks/backup/Backup.hpp	2012-12-03 15:29:35 +0000
@@ -618,8 +618,17 @@ public:
   Object_list::DataBufferPool c_objectListPool;
 
   RSS_AP_SNAPSHOT(c_fragmentPool);
+#ifdef ERROR_INSERT
+  /**
+   * LCP uses a fragment
+   */
+  Uint32 rss_c_lcpFragment;
+  Uint32 rss_c_lcpObjList;
+  Uint32 rss_c_lcpTable;
+#endif
   RSS_AP_SNAPSHOT(c_triggerPool);
   RSS_AP_SNAPSHOT(c_objectListPool);
+  RSS_AP_SNAPSHOT(c_tablePool);
 
   void checkFile(Signal*, BackupFilePtr);
   void checkScan(Signal*, BackupFilePtr);

=== modified file 'storage/ndb/src/kernel/blocks/backup/BackupInit.cpp'
--- a/storage/ndb/src/kernel/blocks/backup/BackupInit.cpp	2012-11-22 13:24:38 +0000
+++ b/storage/ndb/src/kernel/blocks/backup/BackupInit.cpp	2012-12-03 15:29:35 +0000
@@ -140,6 +140,12 @@ Backup::Backup(Block_context& ctx, Uint3
   addRecSignal(GSN_PREP_DROP_TAB_REQ, &Backup::execPREP_DROP_TAB_REQ);
   addRecSignal(GSN_DROP_TAB_REQ, &Backup::execDROP_TAB_REQ);
   addRecSignal(GSN_ALTER_TAB_REQ, &Backup::execALTER_TAB_REQ);
+
+#ifdef ERROR_INSERT
+  rss_c_lcpFragment = 0;
+  rss_c_lcpObjList = 0;
+  rss_c_lcpTable = 0;
+#endif
 }
 
 Backup::~Backup()

=== modified file 'storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2012-11-29 14:04:03 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2012-12-03 15:29:35 +0000
@@ -379,8 +379,8 @@ void Dbdih::execCONTINUEB(Signal* signal
   case DihContinueB::ZREAD_PAGES_INTO_TABLE:
     {
       jam();
-      Uint32 tableId = signal->theData[1];
-      readPagesIntoTableLab(signal, tableId);
+      Uint32 tabPtrI = signal->theData[1];
+      readPagesIntoTableLab(signal, tabPtrI);
       return;
       break;
     }
@@ -6446,7 +6446,7 @@ void Dbdih::removeNodeFromTable(Signal*
             replicaPtr.p->nextLcp = lcpNo;
             ndbout_c("REMOVING lcp: %u from table: %u frag: %u node: %u",
                      SYSFILE->latestLCP_ID,
-                     tabPtr.i, fragNo, nodeId);
+                     tabPtr.p->m_tableId, fragNo, nodeId);
           }
         }
       }
@@ -11343,7 +11343,7 @@ void Dbdih::initLcpLab(Signal* signal, U
 
   //const Uint32 lcpId = SYSFILE->latestLCP_ID;
 
-  for(; tableId < c_maxTableId; tableId++)
+  for(; tableId <= c_maxTableId; tableId++)
   {
     jam();
     TabRecordPtr tabPtr;
@@ -11378,7 +11378,7 @@ void Dbdih::initLcpLab(Signal* signal, U
       jam();
       signal->theData[0] = DihContinueB::ZINIT_LCP;
       signal->theData[1] = senderRef;
-      signal->theData[2] = tabPtr.i;
+      signal->theData[2] = tableId;
       sendSignalWithDelay(reference(), GSN_CONTINUEB, signal, 20, 3);
       return;
     }//if
@@ -12156,12 +12156,12 @@ Dbdih::copyTabReq_complete(Signal* signa
 /*****************************************************************************/
 /* ******  READ FROM A NUMBER OF PAGES INTO THE TABLE DATA STRUCTURES ********/
 /*****************************************************************************/
-void Dbdih::readPagesIntoTableLab(Signal* signal, Uint32 tableId) 
+void Dbdih::readPagesIntoTableLab(Signal* signal, Uint32 tabPtrI)
 {
   RWFragment rf;
   rf.wordIndex = 35;
   rf.pageIndex = 0;
-  rf.rwfTabPtr.i = tableId;
+  rf.rwfTabPtr.i = tabPtrI;
   c_tablePool.getPtr(rf.rwfTabPtr);
   rf.rwfPageptr.i = rf.rwfTabPtr.p->pageRef[0];
   ptrCheckGuard(rf.rwfPageptr, cpageFileSize, pageRecord);
@@ -12416,7 +12416,7 @@ Dbdih::dump_replica_info()
 {
   FragmentstorePtr fragPtr;
 
-  for(Uint32 tableId = 0; tableId < c_maxTableId; tableId++)
+  for(Uint32 tableId = 0; tableId <= c_maxTableId; tableId++)
   {
     TabRecordPtr tabPtr;
     if (!getTable(tabPtr, tableId))
@@ -12731,7 +12731,7 @@ void Dbdih::copyNodeLab(Signal* signal,
     c_nodeStartMaster.wait = ZFALSE;
     return;
   }//if
-  while (tableId < c_maxTableId)
+  while (tableId <= c_maxTableId)
   {
     jam();
     TabRecordPtr tabPtr;
@@ -12768,7 +12768,7 @@ void Dbdih::copyNodeLab(Signal* signal,
 	/* ----------------------------------------------------------------- */
         jam();
         signal->theData[0] = DihContinueB::ZCOPY_NODE;
-        signal->theData[1] = tableId++;
+        signal->theData[1] = tableId + 1;
         sendSignal(reference(), GSN_CONTINUEB, signal, 2, JBB);
         return;
       } else {
@@ -13254,7 +13254,7 @@ void Dbdih::calculateKeepGciLab(Signal*
   Uint32 TloopCount = 1;
   TabRecordPtr tabPtr;
   do {
-    if (tableId >= c_maxTableId)
+    if (tableId > c_maxTableId)
     {
       if (cnoOfActiveTables > 0) {
         jam();
@@ -13928,7 +13928,7 @@ Dbdih::checkLcpAllTablesDoneInLqh(Uint32
   /**
    * Check if finished with all tables
    */
-  for (Uint32 tableId = 0; tableId < c_maxTableId; tableId++)
+  for (Uint32 tableId = 0; tableId <= c_maxTableId; tableId++)
   {
     jam();
     TabRecordPtr tabPtr;
@@ -14196,7 +14196,7 @@ void Dbdih::checkLcpCompletedLab(Signal*
     return;
   }
 
-  for (Uint32 tableId = 0; tableId < c_maxTableId; tableId++)
+  for (Uint32 tableId = 0; tableId <= c_maxTableId; tableId++)
   {
     jam();
     TabRecordPtr tabPtr;
@@ -18174,7 +18174,7 @@ Dbdih::execDUMP_STATE_ORD(Signal* signal
     }
 
     Uint32 tableId = signal->theData[1];
-    if (tableId < c_maxTableId)
+    if (tableId <= c_maxTableId)
     {
       signal->theData[0] = 7021;
       execDUMP_STATE_ORD(signal);

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp	2012-11-22 13:24:38 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp	2012-12-03 15:29:35 +0000
@@ -108,7 +108,7 @@ Uint32
 Dbtup::getRealpidCheck(Fragrecord* regFragPtr, Uint32 logicalPageId) 
 {
   DynArr256 map(c_page_map_pool, regFragPtr->m_page_map);
-  Uint32 * ptr = map.get(2 * logicalPageId);
+  Uint32 * ptr = map.get(2 * logicalPageId, /* checkhi */ false);
   if (likely(ptr != 0))
   {
     Uint32 val = * ptr;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0 branch (jonas.oreland:5046 to 5047) Jonas Oreland4 Dec