You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ko...@apache.org on 2017/03/01 16:37:53 UTC

[19/43] couch-mrview commit: updated refs/heads/2971-count-distinct to f7c3c24

Reset row_sent at end of query

We need to reset row_sent to false at the end of the query so that we
will emit '{"rows":{' for the next query (if we're in a multi-query
request).

COUCHDB-3060


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/commit/e9e84c5d
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/e9e84c5d
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/e9e84c5d

Branch: refs/heads/2971-count-distinct
Commit: e9e84c5d55ec5ef9b83dba0800bc27c23b4b35f6
Parents: 82f7913
Author: Robert Newson <rn...@apache.org>
Authored: Thu Aug 25 13:08:21 2016 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Thu Aug 25 13:08:58 2016 +0100

----------------------------------------------------------------------
 src/couch_mrview_http.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/e9e84c5d/src/couch_mrview_http.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_http.erl b/src/couch_mrview_http.erl
index 341495e..529d208 100644
--- a/src/couch_mrview_http.erl
+++ b/src/couch_mrview_http.erl
@@ -382,7 +382,7 @@ view_cb(complete, #vacc{resp=Resp, buffer=Buf, threshold=Max}=Acc) ->
             {ok, Resp2} = chttpd:end_delayed_json_response(Resp1),
             {ok, Acc#vacc{resp=Resp2}};
         _ ->
-            {ok, Acc#vacc{resp=Resp1,
+            {ok, Acc#vacc{resp=Resp1, row_sent=false,
                 prepend=",\r\n", buffer=[], bufsize=0}}
     end;
 view_cb({error, Reason}, #vacc{resp=undefined}=Acc) ->