diff options
author | Paul Joseph Davis <davisp@apache.org> | 2011-08-15 03:57:48 +0000 |
---|---|---|
committer | Paul Joseph Davis <davisp@apache.org> | 2011-08-15 03:57:48 +0000 |
commit | 0dc0f8b41f627876f65183ea1d99c68b16abeae0 (patch) | |
tree | cc8b672ac2c4f3b7a38c05c3c0de0be023369b15 /src/couchdb/couch_httpd_db.erl | |
parent | 2eb62337efc1171d1ea1e4392f8cacf0dabc1ab0 (diff) |
Fix empty range check for raw collation.
The check for empty ranges was not taking into account the
view option for raw collation. This fixes that by passing
the couch_btree:less/2 function into the check.
Patch by: Jason Smith
Back port of: 1156506, 1156507, 1156509, 1156509, 1156610
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1157706 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd_db.erl')
-rw-r--r-- | src/couchdb/couch_httpd_db.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/couchdb/couch_httpd_db.erl b/src/couchdb/couch_httpd_db.erl index 71204598..db430bbd 100644 --- a/src/couchdb/couch_httpd_db.erl +++ b/src/couchdb/couch_httpd_db.erl @@ -477,6 +477,7 @@ db_req(#httpd{path_parts=[_, DocId | FileNameParts]}=Req, Db) -> db_attachment_req(Req, Db, DocId, FileNameParts). all_docs_view(Req, Db, Keys) -> + RawCollator = fun(A, B) -> A < B end, #view_query_args{ start_key = StartKey, start_docid = StartDocId, @@ -486,7 +487,8 @@ all_docs_view(Req, Db, Keys) -> skip = SkipCount, direction = Dir, inclusive_end = Inclusive - } = QueryArgs = couch_httpd_view:parse_view_params(Req, Keys, map), + } = QueryArgs + = couch_httpd_view:parse_view_params(Req, Keys, map, RawCollator), {ok, Info} = couch_db:get_db_info(Db), CurrentEtag = couch_httpd:make_etag(Info), couch_httpd:etag_respond(Req, CurrentEtag, fun() -> |