List:Commits« Previous MessageNext Message »
From:jonas Date:April 30 2007 12:56pm
Subject:bk commit into 5.1 tree (jonas:1.2471) BUG#28161
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-04-30 12:56:16+02:00, jonas@stripped +6 -0
  ndb - bug#28161
    fix commit triggers with DD but not using DD

  storage/ndb/include/kernel/signaldata/TupCommit.hpp@stripped, 2007-04-30 12:56:14+02:00,
jonas@stripped +2 -1
    add diskpage

  storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp@stripped, 2007-04-30 12:56:14+02:00,
jonas@stripped +1 -0
    add diskpage

  storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp@stripped, 2007-04-30 12:56:14+02:00,
jonas@stripped +9 -5
    pass disk/nodisk down detachedtrigger-path

  storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp@stripped, 2007-04-30 12:56:14+02:00,
jonas@stripped +15 -2
    use TUPCOMMIT req for signaling diskpage back and forth
      so that I can init pointers (VM_TRACE) when from LQH

  storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp@stripped, 2007-04-30 12:56:14+02:00,
jonas@stripped +0 -1
    remove niclude

  storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp@stripped, 2007-04-30 12:56:14+02:00,
jonas@stripped +19 -14
    only derefence disk pointer if needed

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	jonas
# Host:	perch.ndb.mysql.com
# Root:	/home/jonas/src/51-telco-gca

--- 1.3/storage/ndb/include/kernel/signaldata/TupCommit.hpp	2007-04-30 12:56:21 +02:00
+++ 1.4/storage/ndb/include/kernel/signaldata/TupCommit.hpp	2007-04-30 12:56:21 +02:00
@@ -35,7 +35,7 @@
   friend bool printTUPCOMMITREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16
receiverBlockNo);
 
 public:
-  STATIC_CONST( SignalLength = 3 );
+  STATIC_CONST( SignalLength = 4 );
 
 private:
 
@@ -45,6 +45,7 @@
   Uint32 opPtr;
   Uint32 gci;
   Uint32 hashValue;
+  Uint32 diskpage;
 };
 
 #endif

--- 1.137/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2007-04-30 12:56:21 +02:00
+++ 1.138/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2007-04-30 12:56:21 +02:00
@@ -6348,6 +6348,7 @@
       tupCommitReq->opPtr = sig0;
       tupCommitReq->gci = regTcPtr.p->gci;
       tupCommitReq->hashValue = regTcPtr.p->hashValue;
+      tupCommitReq->diskpage = RNIL;
       EXECUTE_DIRECT(tup, GSN_TUP_COMMITREQ, signal, 
 		     TupCommitReq::SignalLength);
 

--- 1.60/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp	2007-04-30 12:56:21 +02:00
+++ 1.61/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp	2007-04-30 12:56:21 +02:00
@@ -2126,7 +2126,8 @@
 #endif
   void checkDetachedTriggers(KeyReqStruct *req_struct,
                              Operationrec* regOperPtr,
-                             Tablerec* regTablePtr);
+                             Tablerec* regTablePtr,
+                             bool disk);
 
   void fireImmediateTriggers(KeyReqStruct *req_struct,
                              DLList<TupTriggerData>& triggerList, 
@@ -2138,7 +2139,8 @@
 
   void fireDetachedTriggers(KeyReqStruct *req_struct,
                             DLList<TupTriggerData>& triggerList,
-                            Operationrec* regOperPtr);
+                            Operationrec* regOperPtr,
+                            bool disk);
 
   void executeTriggers(KeyReqStruct *req_struct,
                        DLList<TupTriggerData>& triggerList,
@@ -2146,7 +2148,8 @@
 
   void executeTrigger(KeyReqStruct *req_struct,
                       TupTriggerData* trigPtr, 
-                      Operationrec* regOperPtr);
+                      Operationrec* regOperPtr,
+                      bool disk = true);
 
   bool readTriggerInfo(TupTriggerData* trigPtr,
                        Operationrec* regOperPtr,
@@ -2157,8 +2160,9 @@
                        Uint32* afterBuffer,
                        Uint32& noAfterWords,
                        Uint32* beforeBuffer,
-                       Uint32& noBeforeWords);
-
+                       Uint32& noBeforeWords,
+                       bool disk);
+  
   void sendTrigAttrInfo(Signal*        signal, 
                         Uint32*        data, 
                         Uint32         dataLen,

--- 1.24/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp	2007-04-30 12:56:22 +02:00
+++ 1.25/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp	2007-04-30 12:56:22 +02:00
@@ -358,6 +358,7 @@
   tupCommitReq->opPtr= opPtrI;
   tupCommitReq->hashValue= hash_value;
   tupCommitReq->gci= gci;
+  tupCommitReq->diskpage = page_id;
 
   regOperPtr.p->op_struct.m_load_diskpage_on_commit= 0;
   regOperPtr.p->m_commit_disk_callback_page= page_id;
@@ -388,14 +389,15 @@
   
   c_operation_pool.getPtr(regOperPtr, opPtrI);
   c_lqh->get_op_info(regOperPtr.p->userpointer, &hash_value, &gci);
+  Uint32 page= regOperPtr.p->m_commit_disk_callback_page;
 
   TupCommitReq * const tupCommitReq= (TupCommitReq *)signal->getDataPtr();
   
   tupCommitReq->opPtr= opPtrI;
   tupCommitReq->hashValue= hash_value;
   tupCommitReq->gci= gci;
+  tupCommitReq->diskpage = page;
 
-  Uint32 page= regOperPtr.p->m_commit_disk_callback_page;
   ndbassert(regOperPtr.p->op_struct.m_load_diskpage_on_commit == 0);
   regOperPtr.p->op_struct.m_wait_log_buffer= 0;
   m_global_page_pool.getPtr(m_pgman.m_ptr, page);
@@ -480,7 +482,16 @@
   req_struct.signal= signal;
   req_struct.hash_value= hash_value;
   req_struct.gci= gci;
+  regOperPtr.p->m_commit_disk_callback_page = tupCommitReq->diskpage;
 
+#ifdef VM_TRACE
+  if (tupCommitReq->diskpage == RNIL)
+  {
+    m_pgman.m_ptr.setNull();
+    req_struct.m_disk_page_ptr.setNull();
+  }
+#endif
+  
   ptrCheckGuard(regTabPtr, no_of_tablerec, tablerec);
 
   PagePtr page;
@@ -628,8 +639,10 @@
     /**
      * Perform "real" commit
      */
+    Uint32 disk = regOperPtr.p->m_commit_disk_callback_page;
     set_change_mask_info(&req_struct, regOperPtr.p);
-    checkDetachedTriggers(&req_struct, regOperPtr.p, regTabPtr.p);
+    checkDetachedTriggers(&req_struct, regOperPtr.p, regTabPtr.p, 
+                          disk != RNIL);
     
     if(regOperPtr.p->op_struct.op_type != ZDELETE)
     {

--- 1.54/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp	2007-04-30 12:56:22 +02:00
+++ 1.55/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp	2007-04-30 12:56:22 +02:00
@@ -24,7 +24,6 @@
 #include "AttributeOffset.hpp"
 #include <AttributeHeader.hpp>
 #include <Interpreter.hpp>
-#include <signaldata/TupCommit.hpp>
 #include <signaldata/TupKey.hpp>
 #include <signaldata/AttrInfo.hpp>
 #include <NdbSqlUtil.hpp>

--- 1.27/storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp	2007-04-30 12:56:22 +02:00
+++ 1.28/storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp	2007-04-30 12:56:22 +02:00
@@ -459,7 +459,8 @@
 /* ---------------------------------------------------------------- */
 void Dbtup::checkDetachedTriggers(KeyReqStruct *req_struct,
                                   Operationrec* regOperPtr,
-                                  Tablerec* regTablePtr)
+                                  Tablerec* regTablePtr,
+                                  bool disk)
 {
   Uint32 save_type = regOperPtr->op_struct.op_type;
   Tuple_header *save_ptr = req_struct->m_tuple_ptr;  
@@ -505,7 +506,7 @@
     // If any fired immediate insert trigger then fetch after tuple
     fireDetachedTriggers(req_struct,
                          regTablePtr->subscriptionInsertTriggers, 
-                         regOperPtr);
+                         regOperPtr, disk);
     break;
   case(ZDELETE):
     ljam();
@@ -519,7 +520,7 @@
     // FIRETRIGORD with the before tuple
     fireDetachedTriggers(req_struct,
 			 regTablePtr->subscriptionDeleteTriggers, 
-			 regOperPtr);
+			 regOperPtr, disk);
     break;
   case(ZUPDATE):
     ljam();
@@ -533,7 +534,7 @@
     // and send two FIRETRIGORD one with before tuple and one with after tuple
     fireDetachedTriggers(req_struct,
                          regTablePtr->subscriptionUpdateTriggers, 
-                         regOperPtr);
+                         regOperPtr, disk);
     break;
   default:
     ndbrequire(false);
@@ -591,7 +592,8 @@
 void 
 Dbtup::fireDetachedTriggers(KeyReqStruct *req_struct,
                             DLList<TupTriggerData>& triggerList, 
-                            Operationrec* const regOperPtr)
+                            Operationrec* const regOperPtr,
+                            bool disk)
 {
   
   TriggerPtr trigPtr;  
@@ -612,7 +614,8 @@
       ljam();
       executeTrigger(req_struct,
                      trigPtr.p,
-                     regOperPtr);
+                     regOperPtr,
+                     disk);
     }
     triggerList.next(trigPtr);
   }
@@ -636,7 +639,8 @@
 
 void Dbtup::executeTrigger(KeyReqStruct *req_struct,
                            TupTriggerData* const trigPtr,
-                           Operationrec* const regOperPtr)
+                           Operationrec* const regOperPtr,
+                           bool disk)
 {
   /**
    * The block below does not work together with GREP.
@@ -703,7 +707,8 @@
                        afterBuffer,
                        noAfterWords,
                        beforeBuffer,
-                       noBeforeWords)) {
+                       noBeforeWords,
+                       disk)) {
     ljam();
     return;
   }
@@ -806,9 +811,9 @@
                             Uint32* const afterBuffer,
                             Uint32& noAfterWords,
                             Uint32* const beforeBuffer,
-                            Uint32& noBeforeWords)
+                            Uint32& noBeforeWords,
+                            bool disk)
 {
-  //XXX this will not work with varsize attributes...
   noAfterWords = 0;
   noBeforeWords = 0;
   Uint32 readBuffer[MAX_ATTRIBUTES_IN_TABLE];
@@ -841,8 +846,8 @@
       c_undo_buffer.get_ptr(&req_struct->prevOpPtr.p->m_copy_tuple_location);
   }
 
-  if (regTabPtr->need_expand()) 
-    prepare_read(req_struct, regTabPtr, true);
+  if (regTabPtr->need_expand(disk)) 
+    prepare_read(req_struct, regTabPtr, disk);
   
   int ret = readAttributes(req_struct,
 			   &tableDescriptor[regTabPtr->readKeyArray].tabDescr,
@@ -937,8 +942,8 @@
       req_struct->m_tuple_ptr= (Tuple_header*)ptr;
     }
 
-    if (regTabPtr->need_expand()) // no disk 
-      prepare_read(req_struct, regTabPtr, true);
+    if (regTabPtr->need_expand(disk)) 
+      prepare_read(req_struct, regTabPtr, disk);
     
     int ret = readAttributes(req_struct,
 			     &readBuffer[0],
Thread
bk commit into 5.1 tree (jonas:1.2471) BUG#28161jonas30 Apr