List:Commits« Previous MessageNext Message »
From:Pekka Nousiainen Date:April 25 2011 2:15pm
Subject:bzr commit into mysql-5.1-telco-7.0-wl4163 branch (pekka:4337) WL#4163
View as plain text  
#At file:///export/space/pekka/ms/ms-wl4163-70/ based on revid:pekka@stripped

 4337 Pekka Nousiainen	2011-04-25
      wl#4163 c01_ops.diff
      remove use of bottom node in search-to-add

    modified:
      storage/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp
=== modified file 'storage/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp	2011-04-24 16:12:04 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp	2011-04-25 14:15:19 +0000
@@ -37,11 +37,6 @@ Dbtux::searchToAdd(TuxCtx& ctx, Frag& fr
     return true;
   }
   NodeHandle glbNode(frag);     // potential g.l.b of final node
-  /*
-   * In order to not (yet) change old behaviour, a position between
-   * 2 nodes returns the one at the bottom of the tree.
-   */
-  NodeHandle bottomNode(frag);
   while (true) {
     thrjam(ctx.jamBuffer);
     selectNode(currNode, currNode.m_loc);
@@ -73,8 +68,7 @@ Dbtux::searchToAdd(TuxCtx& ctx, Frag& fr
       }
       if (! glbNode.isNull()) {
         thrjam(ctx.jamBuffer);
-        // move up to the g.l.b but remember the bottom node
-        bottomNode = currNode;
+        // move up to the g.l.b
         currNode = glbNode;
       }
     } else if (ret > 0) {
@@ -130,25 +124,7 @@ Dbtux::searchToAdd(TuxCtx& ctx, Frag& fr
     if (hi - lo == 1)
       break;
   }
-  if (ret < 0) {
-    thrjam(ctx.jamBuffer);
-    treePos.m_pos = hi;
-    return true;
-  }
-  if ((uint) hi < currNode.getOccup()) {
-    thrjam(ctx.jamBuffer);
-    treePos.m_pos = hi;
-    return true;
-  }
-  if (bottomNode.isNull()) {
-    thrjam(ctx.jamBuffer);
-    treePos.m_pos = hi;
-    return true;
-  }
-  thrjam(ctx.jamBuffer);
-  // backwards compatible for now
-  treePos.m_loc = bottomNode.m_loc;
-  treePos.m_pos = 0;
+  treePos.m_pos = hi;
   return true;
 }
 


Attachment: [text/bzr-bundle] bzr/pekka@mysql.com-20110425141519-7daxjjfqi2tnwpoj.bundle
Thread
bzr commit into mysql-5.1-telco-7.0-wl4163 branch (pekka:4337) WL#4163Pekka Nousiainen25 Apr