Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 628369E41 for ; Sat, 18 Feb 2012 13:55:25 +0000 (UTC) Received: (qmail 94512 invoked by uid 500); 18 Feb 2012 13:55:24 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 94378 invoked by uid 500); 18 Feb 2012 13:55:24 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 94010 invoked by uid 99); 18 Feb 2012 13:55:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Feb 2012 13:55:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Feb 2012 13:55:22 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id A0ABE1BE8C7 for ; Sat, 18 Feb 2012 13:55:02 +0000 (UTC) Date: Sat, 18 Feb 2012 13:55:02 +0000 (UTC) From: "Filipe Manana (Created) (JIRA)" To: dev@couchdb.apache.org Message-ID: <1217101725.54211.1329573302659.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (COUCHDB-1413) Reduce queries with ?inclusive_end=false and endkey/endkey_docid or startkey/startkey_docid (if ?descending=true) produce incorrect reductions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Reduce queries with ?inclusive_end=false and endkey/endkey_docid or startkey/startkey_docid (if ?descending=true) produce incorrect reductions ---------------------------------------------------------------------------------------------------------------------------------------------- Key: COUCHDB-1413 URL: https://issues.apache.org/jira/browse/COUCHDB-1413 Project: CouchDB Issue Type: Bug Affects Versions: 1.1.1 Reporter: Filipe Manana Assignee: Filipe Manana Fix For: 1.2.1 COUCHDB-1047 attempted to fix endkey being ignored for reduce queries. It works but it's busted when endkey_docid is also present, as it produces wrong results. Using end_key_gt as an endkey in the btree fold reduce operation is not enough to guarantee correct results for all cases. The following script reproduces the issue and the following patch fixes it. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira