Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 52542 invoked from network); 20 Nov 2010 16:14:07 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Nov 2010 16:14:07 -0000 Received: (qmail 30689 invoked by uid 500); 20 Nov 2010 16:14:38 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 30545 invoked by uid 500); 20 Nov 2010 16:14:37 -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 30524 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 oAKGEFJ5007816 for ; Sat, 20 Nov 2010 16:14:15 GMT Message-ID: <5214592.215631290269655705.JavaMail.jira@thor> Date: Sat, 20 Nov 2010 11:14:15 -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: 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.