Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 52608 invoked from network); 20 Nov 2010 16:14:09 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Nov 2010 16:14:09 -0000 Received: (qmail 31421 invoked by uid 500); 20 Nov 2010 16:14:39 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 30584 invoked by uid 500); 20 Nov 2010 16:14:38 -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 30533 invoked by uid 99); 20 Nov 2010 16:14:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Nov 2010 16:14:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Nov 2010 16:14:36 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oAKGEGT7007825 for ; Sat, 20 Nov 2010 16:14:16 GMT Message-ID: <1429245.215661290269656273.JavaMail.jira@thor> Date: Sat, 20 Nov 2010 11:14:16 -0500 (EST) From: "Filipe Manana (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Updated: (COUCHDB-925) altering 'doc' variable in map function affects other map functions In-Reply-To: <12557320.74301288077320316.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-925?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Filipe Manana updated COUCHDB-925: ---------------------------------- Attachment: (was: COUCHDB-925.patch) > altering 'doc' variable in map function affects other map functions > ------------------------------------------------------------------- > > Key: COUCHDB-925 > URL: https://issues.apache.org/jira/browse/COUCHDB-925 > Project: CouchDB > Issue Type: Bug > Affects Versions: 1.0.1 > Environment: Erlang R13B03, Spidermonkey 1.7, Ubuntu 10.04 > Reporter: afters > Attachments: COUCHDB-925.patch > > > I have the following two map functions (v1.0.1): > function (doc) { > emit(doc.path[0], null); > } > function (doc) { > doc.path = [ 'an intruder from another view' ]; > } > When the views are built, the first map function sees a 'doc' variable that > was changed by the second map function, and thus emits the key 'an intruder > from another view'. > The real documents remain untouched. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.