You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "afters (JIRA)" <ji...@apache.org> on 2010/10/27 21:49:22 UTC

[jira] Commented: (COUCHDB-925) altering 'doc' variable in map function affects other map functions

    [ https://issues.apache.org/jira/browse/COUCHDB-925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12925526#action_12925526 ] 

afters commented on COUCHDB-925:
--------------------------------

Looking at the 'Install.Unix' file, I was reminded that the SpiderMonkey 1.8 is a dependency. 
If I understood your comment correctly, there's no much point for me to upgrade SM right now, as even if the problem were fixed there, a separate fix would still be needed in couch. Correct?


> 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
>
> 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.