List:Commits« Previous MessageNext Message »
From:pekka Date:January 12 2006 3:35pm
Subject:bk commit into 5.1 tree (pekka:1.2042)
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.2042 06/01/12 16:34:57 pekka@stripped +2 -0
  ndb - wl#2972 tiny bugfix

  storage/ndb/test/ndbapi/test_event_merge.cpp
    1.7 06/01/12 16:15:27 pekka@stripped +30 -14
    continue

  storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
    1.28 06/01/12 16:14:39 pekka@stripped +1 -0
    bugfix

# 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.27/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2006-01-02 09:57:27 +01:00
+++ 1.28/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2006-01-12 16:14:39 +01:00
@@ -1523,6 +1523,7 @@
         else
           break;
       }
+      ptr[2].sz = k;
     }
   }
 

--- 1.6/storage/ndb/test/ndbapi/test_event_merge.cpp	2006-01-11 23:49:47 +01:00
+++ 1.7/storage/ndb/test/ndbapi/test_event_merge.cpp	2006-01-12 16:15:27 +01:00
@@ -473,9 +473,9 @@
   Kind kind;
   Type type;
   Op* next_op; // within one commit
-  Op* next_com; // next commit chain or next event
+  Op* next_com; // next commit chain
   Op* next_gci; // groups commit chains (unless --separate-events)
-  Op* next_ev;
+  Op* next_ev; // next event
   Op* next_free; // free list
   bool free; // on free list
   uint num_op;
@@ -564,6 +564,8 @@
 static NdbBlob* g_ev_bh[2][g_maxcol]; // 0-post 1-pre
 static Op* g_rec_ev;
 static uint g_ev_pos[g_maxpk];
+static uint g_num_gci = 0;
+static uint g_num_ev = 0;
 
 static Op*
 getop(Op::Kind a_kind)
@@ -651,6 +653,7 @@
     }
   }
   assert(g_usedops == 0);
+  g_num_gci = g_num_ev = 0;
 }
 
 struct Comp {
@@ -877,10 +880,9 @@
   chkdb((g_evt_op = g_ndb->createEventOperation(g_evt->getName(), bsz)) != 0);
 #else
   chkdb((g_evt_op = g_ndb->createEventOperation(g_evt->getName())) != 0);
-#ifdef version51rbr
+  // available in gci merge changeset
   g_evt_op->separateEvents(g_opts.separate_events); // not yet inherited
 #endif
-#endif
   uint i;
   for (i = 0; i < ncol(); i++) {
     const Col& c = g_col[i];
@@ -1203,8 +1205,9 @@
     // copy to gci level
     copyop(com_op, gci_op);
     tot_op->num_com += 1;
+    g_num_gci += 1;
   }
-  ll1("makeops: used ops = " << g_usedops);
+  ll1("makeops: used ops = " << g_usedops << " com ops = " << g_num_gci);
 }
 
 static int
@@ -1341,12 +1344,13 @@
         gci_op2 = gci_op2->next_gci;
         freeop(tmp_op);
         mergecnt++;
+        assert(g_num_gci != 0);
+        g_num_gci--;
       }
       gci_op = gci_op->next_gci = gci_op2;
     }
   }
-  ll1("mergeops: used ops = " << g_usedops);
-  ll1("mergeops: merged " << mergecnt << " gci entries");
+  ll1("mergeops: used ops = " << g_usedops << " gci ops = " << g_num_gci);
   return 0;
 }
 
@@ -1504,27 +1508,37 @@
 static int
 matchops()
 {
+  ll1("matchops");
+  uint nomatch = 0;
   Uint32 pk1;
   for (pk1 = 0; pk1 < g_opts.maxpk; pk1++) {
     Op* tot_op = g_pk_op[pk1];
     if (tot_op == 0)
       continue;
-    Op* com_op = tot_op->next_com;
-    while (com_op != 0) {
-      if (com_op->type != Op::NUL && ! com_op->match) {
+    Op* gci_op = tot_op->next_gci;
+    while (gci_op != 0) {
+      if (gci_op->type == Op::NUL) {
+        ll2("GCI: " << *gci_op << " [skip NUL]");
+      } else if (gci_op->match) {
+        ll2("GCI: " << *gci_op << " [match OK]");
+      } else {
+        ll0("GCI: " << *gci_op);
+        Op* com_op = gci_op->next_com;
+        assert(com_op != 0);
         ll0("COM: " << *com_op);
         Op* op = com_op->next_op;
         assert(op != 0);
         while (op != 0) {
-          ll0("---: " << *op);
+          ll0("OP : " << *op);
           op = op->next_op;
         }
         ll0("no matching event");
-        return -1;
+        nomatch++;
       }
-      com_op = com_op->next_com;
+      gci_op = gci_op->next_gci;
     }
   }
+  chkrc(nomatch == 0);
   return 0;
 }
 
@@ -1619,9 +1633,10 @@
       Op* ev = getop(Op::EV);
       copyop(g_rec_ev, ev);
       last_ev->next_ev = ev;
+      g_num_ev++;
     }
   }
-  ll1("runevents: used ops = " << g_usedops);
+  ll1("runevents: used ops = " << g_usedops << " events = " << g_num_ev);
   return 0;
 }
 
@@ -1666,6 +1681,7 @@
       chkrc(mergeops() == 0);
     cmppostpre();
     chkrc(runevents() == 0);
+    ll0("counts: gci = " << g_num_gci << " ev = " << g_num_ev);
     chkrc(matchevents() == 0);
     chkrc(matchops() == 0);
     chkrc(dropeventop() == 0);
Thread
bk commit into 5.1 tree (pekka:1.2042)pekka12 Jan