couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r646163 - /incubator/couchdb/trunk/src/couchdb/couch_btree.erl
Date Wed, 09 Apr 2008 01:01:44 GMT
Author: damien
Date: Tue Apr  8 18:01:43 2008
New Revision: 646163

URL: http://svn.apache.org/viewvc?rev=646163&view=rev
Log:
Fix for btree modification bug.

Modified:
    incubator/couchdb/trunk/src/couchdb/couch_btree.erl

Modified: incubator/couchdb/trunk/src/couchdb/couch_btree.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/src/couchdb/couch_btree.erl?rev=646163&r1=646162&r2=646163&view=diff
==============================================================================
--- incubator/couchdb/trunk/src/couchdb/couch_btree.erl (original)
+++ incubator/couchdb/trunk/src/couchdb/couch_btree.erl Tue Apr  8 18:01:43 2008
@@ -289,17 +289,20 @@
     ],
     {ok, ResultList, Bt}.
 
+
 modify_kpnode(Bt, KPs, [], ResultNode, QueryOutput) ->
     % processed all queries for the current tree
     {ok, lists:reverse(ResultNode, KPs), QueryOutput, Bt};
 
+modify_kpnode(Bt, [], Actions, [], QueryOutput) ->
+    modify_node(Bt, nil, Actions, QueryOutput);
+
 modify_kpnode(Bt, [], Actions, [{_Key, PointerInfo} | ResultNode], QueryOutput) ->
     {ok, ChildKPs, QueryOutput2, Bt2} = modify_node(Bt, PointerInfo, Actions, QueryOutput),
     {ok, lists:reverse(ResultNode, ChildKPs), QueryOutput2, Bt2};
 
 modify_kpnode(Bt, [{Key,PointerInfo} | RestKPs], Actions, ResultNode, QueryOutput) ->
-    % Split the actions into two lists, queries of values less
-    % than equals, and greater than the current key
+    % Split the actions into two lists, queries of values <= and > than the current
key
     SplitFun = fun({_ActionType, ActionKey, _ActionValue}) ->
             not less(Bt, Key, ActionKey)
         end,



Mime
View raw message