List:Commits« Previous MessageNext Message »
From:pekka Date:January 23 2006 6:28am
Subject:bk commit into 5.1 tree (pekka:1.2076)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of pekka. When pekka 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
  1.2076 06/01/23 07:27:49 pekka@stripped +2 -0
  ndb - wl#2972 injector cleanup accessed blob event ops via Ndb => crash

  storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp
    1.13 06/01/23 07:24:45 pekka@stripped +2 -5
    hide blob event ops under main op

  storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
    1.37 06/01/23 07:24:45 pekka@stripped +14 -9
    hide blob event ops under main op

# 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:	pekka
# Host:	orca.ndb.mysql.com
# Root:	/space/pekka/ndb/version/my51-rbr

--- 1.36/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2006-01-22 13:27:23 +01:00
+++ 1.37/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2006-01-23 07:24:45 +01:00
@@ -337,14 +337,16 @@
         break;
       }
       tLastBlopOp = tBlobOp;
-      tBlobOp = tBlobOp->theNextBlobOp;
+      tBlobOp = tBlobOp->m_next;
     }
 
     DBUG_PRINT("info", ("%s op %s", tBlobOp ? " reuse" : " create", bename));
 
     // create blob event op if not found
     if (tBlobOp == NULL) {
-      NdbEventOperation* tmp = m_ndb->createEventOperation(bename);
+      // to hide blob op it is linked under main op, not under m_ndb
+      NdbEventOperation* tmp =
+        m_ndb->theEventBuffer->createEventOperation(bename, m_error);
       if (tmp == NULL)
         DBUG_RETURN(NULL);
       tBlobOp = &tmp->m_impl;
@@ -357,8 +359,8 @@
       if (tLastBlopOp == NULL)
         theBlobOpList = tBlobOp;
       else
-        tLastBlopOp->theNextBlobOp = tBlobOp;
-      tBlobOp->theNextBlobOp = NULL;
+        tLastBlopOp->m_next = tBlobOp;
+      tBlobOp->m_next = NULL;
     }
   }
 
@@ -484,7 +486,7 @@
         r = blob_op->execute_nolock();
         if (r != 0)
           break;
-        blob_op = blob_op->theNextBlobOp;
+        blob_op = blob_op->m_next;
       }
     }
     if (r == 0)
@@ -2017,12 +2019,15 @@
     m_dropped_ev_op->m_prev= op;
   m_dropped_ev_op= op;
  
-  // drop blob ops
-  while (op->theBlobOpList != NULL)
+  // stop blob event ops
+  if (op->theMainOp == NULL)
   {
     NdbEventOperationImpl* tBlobOp = op->theBlobOpList;
-    op->theBlobOpList = op->theBlobOpList->theNextBlobOp;
-    (void)m_ndb->dropEventOperation(tBlobOp);
+    while (tBlobOp != NULL)
+    {
+      tBlobOp->stop();
+      tBlobOp = tBlobOp->m_next;
+    }
   }
 
   // ToDo, take care of these to be deleted at the

--- 1.12/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp	2006-01-19 14:00:03 +01:00
+++ 1.13/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp	2006-01-23 07:24:45 +01:00
@@ -223,11 +223,8 @@
   NdbRecAttr *theCurrentDataAttrs[2];
 
   NdbBlob* theBlobList;
-  union {
-  NdbEventOperationImpl* theBlobOpList;
-  NdbEventOperationImpl* theNextBlobOp;
-  };
-  NdbEventOperationImpl* theMainOp; // blob op pointer to main op
+  NdbEventOperationImpl* theBlobOpList; // in main op, list of blob ops
+  NdbEventOperationImpl* theMainOp; // in blob op, the main op
 
   NdbEventOperation::State m_state; /* note connection to mi_type */
   Uint32 mi_type; /* should be == 0 if m_state != EO_EXECUTING
Thread
bk commit into 5.1 tree (pekka:1.2076)pekka23 Jan