List:Commits« Previous MessageNext Message »
From:Jonas Oreland Date:April 4 2009 8:50pm
Subject:bzr commit into mysql-5.1-telco-6.2 branch (jonas:2898) Bug#44015
View as plain text  
#At file:///home/jonas/src/telco-6.2/

 2898 Jonas Oreland	2009-04-04
      ndb - bug#44015 - apparently all tux triggers should fire first...
modified:
  storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
  storage/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp	2009-04-03 08:24:38 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp	2009-04-04 20:50:24 +0000
@@ -2616,8 +2616,7 @@ private:
   bool do_tup_abort_operation(Signal*, Tuple_header *,
                               Operationrec*,
                               Fragrecord*,
-                              Tablerec*,
-                              Uint32);
+                              Tablerec*);
 
 //------------------------------------------------------------------
 //------------------------------------------------------------------

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp	2009-04-03 08:24:38 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp	2009-04-04 20:50:24 +0000
@@ -70,18 +70,9 @@ Dbtup::do_tup_abort_operation(Signal* si
                               Tuple_header *tuple_ptr,
                               Operationrec* opPtrP,
                               Fragrecord* fragPtrP,
-                              Tablerec* tablePtrP,
-                              Uint32 flags)
+                              Tablerec* tablePtrP)
 {
   bool change = true;
-  if (!tablePtrP->tuxCustomTriggers.isEmpty() && 
-      ! (flags & ZSKIP_TUX_TRIGGERS))
-  {
-    executeTuxAbortTriggers(signal,
-                            opPtrP,
-                            fragPtrP,
-                            tablePtrP);
-  }
 
   Uint32 bits= tuple_ptr->m_header_bits;  
   if (opPtrP->op_struct.op_type != ZDELETE)
@@ -202,40 +193,70 @@ void Dbtup::do_tup_abortreq(Signal* sign
   {
     jam();
 
-    bool change = false;
-
-    change = do_tup_abort_operation(signal, 
-                                    tuple_ptr,
-                                    regOperPtr.p,
-                                    regFragPtr.p,
-                                    regTabPtr.p,
-                                    flags);
-    
-    OperationrecPtr loopOpPtr;
-    loopOpPtr.i = regOperPtr.p->nextActiveOp;
-    while (loopOpPtr.i != RNIL) 
+    /**
+     * abort all TUX entries first...if present
+     */
+    if (!regTabPtr.p->tuxCustomTriggers.isEmpty() && 
+        ! (flags & ZSKIP_TUX_TRIGGERS))
     {
       jam();
-      c_operation_pool.getPtr(loopOpPtr);
-      if (get_tuple_state(loopOpPtr.p) != TUPLE_ALREADY_ABORTED)
+      executeTuxAbortTriggers(signal,
+                              regOperPtr.p,
+                              regFragPtr.p,
+                              regTabPtr.p);
+
+      OperationrecPtr loopOpPtr;
+      loopOpPtr.i = regOperPtr.p->nextActiveOp;
+      while (loopOpPtr.i != RNIL) 
       {
         jam();
-        change |= do_tup_abort_operation(signal,
-                                         tuple_ptr,
-                                         loopOpPtr.p,
-                                         regFragPtr.p,
-                                         regTabPtr.p,
-                                         flags);
-        set_tuple_state(loopOpPtr.p, TUPLE_ALREADY_ABORTED);      
-        
+        c_operation_pool.getPtr(loopOpPtr);
+        if (get_tuple_state(loopOpPtr.p) != TUPLE_ALREADY_ABORTED)
+        {
+          jam();
+          executeTuxAbortTriggers(signal,
+                                  loopOpPtr.p,
+                                  regFragPtr.p,
+                                  regTabPtr.p);
+        }
+        loopOpPtr.i = loopOpPtr.p->nextActiveOp;
       }
-      loopOpPtr.i = loopOpPtr.p->nextActiveOp;
     }
-    
-    if (change && (regTabPtr.p->m_bits & Tablerec::TR_Checksum)) 
+
+    /**
+     * Then abort all data changes
+     */
     {
-      jam();
-      setChecksum(tuple_ptr, regTabPtr.p);
+      bool change = do_tup_abort_operation(signal, 
+                                           tuple_ptr,
+                                           regOperPtr.p,
+                                           regFragPtr.p,
+                                           regTabPtr.p);
+      
+      OperationrecPtr loopOpPtr;
+      loopOpPtr.i = regOperPtr.p->nextActiveOp;
+      while (loopOpPtr.i != RNIL) 
+      {
+        jam();
+        c_operation_pool.getPtr(loopOpPtr);
+        if (get_tuple_state(loopOpPtr.p) != TUPLE_ALREADY_ABORTED)
+        {
+          jam();
+          change |= do_tup_abort_operation(signal,
+                                           tuple_ptr,
+                                           loopOpPtr.p,
+                                           regFragPtr.p,
+                                           regTabPtr.p);
+          set_tuple_state(loopOpPtr.p, TUPLE_ALREADY_ABORTED);      
+        }
+        loopOpPtr.i = loopOpPtr.p->nextActiveOp;
+      }
+    
+      if (change && (regTabPtr.p->m_bits & Tablerec::TR_Checksum)) 
+      {
+        jam();
+        setChecksum(tuple_ptr, regTabPtr.p);
+      }
     }
   }
   

Thread
bzr commit into mysql-5.1-telco-6.2 branch (jonas:2898) Bug#44015Jonas Oreland4 Apr