List:Commits« Previous MessageNext Message »
From:Maitrayi Sabaratnam Date:August 28 2012 12:01pm
Subject:bzr push into mysql-5.1-telco-7.1 branch (maitrayi.sabaratnam:4597 to 4598)
View as plain text  
 4598 Maitrayi Sabaratnam	2012-08-28 [merge]
      Merge 70 to 71

    modified:
      storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp
      storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
      storage/ndb/test/ndbapi/testDict.cpp
 4597 Ole John Aske	2012-08-24 [merge]
      Merge 7.0 -> 7.1

    modified:
      mysql-test/mysql-test-run.pl
      storage/ndb/include/kernel/signaldata/DihScanTab.hpp
      storage/ndb/include/kernel/signaldata/TcContinueB.hpp
      storage/ndb/src/kernel/blocks/backup/Backup.cpp
      storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
      storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
      storage/ndb/src/kernel/blocks/dbspj/Dbspj.hpp
      storage/ndb/src/kernel/blocks/dbspj/DbspjMain.cpp
      storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
      storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
      storage/ndb/src/kernel/blocks/suma/Suma.cpp
      storage/ndb/src/ndbapi/ndberror.c
      storage/ndb/test/ndbapi/testScan.cpp
=== modified file 'storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp'
--- a/storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp	2012-04-24 13:17:43 +0000
+++ b/storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp	2012-08-28 11:22:02 +0000
@@ -152,7 +152,10 @@ public:
     DihAllAllowNodeStart = 7016,
     DihMinTimeBetweenLCP = 7017,
     DihMaxTimeBetweenLCP = 7018,
-    // 7019
+    // Checks whether add frag failure was cleaned up.
+    // Should NOT be used while commands involving addFragReq
+    // are being performed
+    DihAddFragFailCleanedUp = 7019,
     // 7020
     // 7021
     EnableUndoDelayDataWrite = 7080, // DIH+ACC+TUP

=== modified file 'storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2012-08-24 12:01:20 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2012-08-28 11:49:01 +0000
@@ -8273,10 +8273,23 @@ Dbdih::execADD_FRAGREF(Signal* signal){
   connectPtr.i = ref->dihPtr;
   ptrCheckGuard(connectPtr, cconnectFileSize, connectRecord);
 
+  Ptr<TabRecord> tabPtr;
+  tabPtr.i = connectPtr.p->table;
+  ptrCheckGuard(tabPtr, ctabFileSize, tabRecord);
+  ndbrequire(tabPtr.p->connectrec == connectPtr.i);
+
   if (connectPtr.p->connectState == ConnectRecord::ALTER_TABLE)
   {
     jam();
 
+    if (AlterTableReq::getReorgFragFlag(connectPtr.p->m_alter.m_changeMask))
+    {
+      jam();
+      DIH_TAB_WRITE_LOCK(tabPtr.p);
+      tabPtr.p->m_new_map_ptr_i = RNIL;
+      DIH_TAB_WRITE_UNLOCK(tabPtr.p);
+    }
+
     connectPtr.p->connectState = ConnectRecord::ALTER_TABLE_ABORT;
     drop_fragments(signal, connectPtr, connectPtr.p->m_alter.m_totalfragments);
     return;
@@ -8290,10 +8303,6 @@ Dbdih::execADD_FRAGREF(Signal* signal){
 	       DiAddTabRef::SignalLength, JBB);  
 
     // Release
-    Ptr<TabRecord> tabPtr;
-    tabPtr.i = connectPtr.p->table;
-    ptrCheckGuard(tabPtr, ctabFileSize, tabRecord);
-    ndbrequire(tabPtr.p->connectrec == connectPtr.i);
     tabPtr.p->connectrec = RNIL;
     release_connect(connectPtr);
   }
@@ -8631,6 +8640,14 @@ void Dbdih::execALTER_TAB_REQ(Signal * s
     connectPtr.p->userpointer = senderData;
     connectPtr.p->userblockref = senderRef;
 
+    if (AlterTableReq::getReorgFragFlag(connectPtr.p->m_alter.m_changeMask))
+    {
+      jam();
+      DIH_TAB_WRITE_LOCK(tabPtr.p);
+      tabPtr.p->m_new_map_ptr_i = RNIL;
+      DIH_TAB_WRITE_UNLOCK(tabPtr.p);
+    }
+
     if (AlterTableReq::getAddFragFlag(req->changeMask))
     {
       jam();
@@ -18109,6 +18126,27 @@ Dbdih::execDUMP_STATE_ORD(Signal* signal
     }
   }
 
+  /* Checks whether add frag failure was cleaned up.
+   * Should NOT be used while commands involving addFragReq
+   * are being performed.
+   */
+  if (arg == DumpStateOrd::DihAddFragFailCleanedUp && signal->length() == 2)
+  {
+    TabRecordPtr tabPtr;
+    tabPtr.i = signal->theData[1];
+    if (tabPtr.i >= ctabFileSize)
+      return;
+
+    ptrCheckGuard(tabPtr, ctabFileSize, tabRecord);
+
+    if (tabPtr.p->m_new_map_ptr_i != RNIL)
+    {
+      jam();
+      warningEvent("new_map_ptr_i to table id %d is not NIL", tabPtr.i);
+      ndbrequire(false);
+    }
+  }
+
   DECLARE_DUMP0(DBDIH, 7213, "Set error 7213 with extra arg")
   {
     SET_ERROR_INSERT_VALUE2(7213, signal->theData[1]);

=== modified file 'storage/ndb/test/ndbapi/testDict.cpp'
--- a/storage/ndb/test/ndbapi/testDict.cpp	2012-08-22 10:49:42 +0000
+++ b/storage/ndb/test/ndbapi/testDict.cpp	2012-08-28 11:22:02 +0000
@@ -7483,6 +7483,9 @@ runFailAddPartition(NDBT_Context* ctx, N
       CHECK(restarter.dumpStateAllNodes(&dump2, 1) == 0);
       NdbSleep_MilliSleep(SAFTY); // Hope that snapshot has arrived
 
+      int dump3[] = {DumpStateOrd::DihAddFragFailCleanedUp, org->getTableId()};
+      CHECK(restarter.dumpStateAllNodes(dump3, 2) == 0);
+
       const NdbDictionary::Table* check = pDic->getTable(tab.getName());
 
       CHECK2((check->getObjectId() == org->getObjectId() &&

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.1 branch (maitrayi.sabaratnam:4597 to 4598) Maitrayi Sabaratnam28 Aug