diff options
author | Damien F. Katz <damien@apache.org> | 2008-07-29 18:23:42 +0000 |
---|---|---|
committer | Damien F. Katz <damien@apache.org> | 2008-07-29 18:23:42 +0000 |
commit | 34b12e7537d8bc020023c15bde9789d3bf29e8e1 (patch) | |
tree | 166dcc65354ef2e89e00a8f1b4e6fd30c39ad38c /src/couchdb/couch_httpd.erl | |
parent | 69228815a04443a7a9063a75608117c674a9a822 (diff) |
Fix for problem with count query arg in grouped reduce views. Previous fix would keep enumerating over subsequent view results despite not returning them.
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@680796 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd.erl')
-rw-r--r-- | src/couchdb/couch_httpd.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl index 49b8e9bc..88271390 100644 --- a/src/couchdb/couch_httpd.erl +++ b/src/couchdb/couch_httpd.erl @@ -465,7 +465,7 @@ output_reduce_view(Req, View) -> fun(_Key, _Red, {AccSeparator,AccSkip,AccCount}) when AccSkip > 0 -> {ok, {AccSeparator,AccSkip-1,AccCount}}; (_Key, _Red, {AccSeparator,0,AccCount}) when AccCount == 0 -> - {ok, {AccSeparator,0,AccCount}}; + {stop, {AccSeparator,0,AccCount}}; (_Key, Red, {AccSeparator,0,AccCount}) when GroupLevel == 0 -> Json = lists:flatten(cjson:encode({obj, [{key, null}, {value, Red}]})), Resp:write_chunk(AccSeparator ++ Json), |