Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 35071 invoked from network); 22 Nov 2010 15:47:09 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 Nov 2010 15:47:09 -0000 Received: (qmail 66548 invoked by uid 500); 22 Nov 2010 15:47:40 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 66478 invoked by uid 500); 22 Nov 2010 15:47: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 66467 invoked by uid 99); 22 Nov 2010 15:47:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Nov 2010 15:47:37 +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; Mon, 22 Nov 2010 15:47:35 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oAMFlDRH015418 for ; Mon, 22 Nov 2010 15:47:13 GMT Message-ID: <28842482.235111290440833818.JavaMail.jira@thor> Date: Mon, 22 Nov 2010 10:47:13 -0500 (EST) From: "Paul Joseph Davis (JIRA)" To: dev@couchdb.apache.org Subject: [jira] Commented: (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 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12934490#action_12934490 ] Paul Joseph Davis commented on COUCHDB-925: ------------------------------------------- Has this been tested with a spidermonkey that's actually broken? It looks fine to me but it might be a good idea to try and find one of the old versions to double check the behavior. Regardless, I'm +1 on committing. > 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.