Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArrayResult may return strange results in some conditions #1584

Closed
neumino opened this issue Oct 28, 2013 · 2 comments
Closed

ArrayResult may return strange results in some conditions #1584

neumino opened this issue Oct 28, 2013 · 2 comments
Assignees
Milestone

Comments

@neumino
Copy link
Member

neumino commented Oct 28, 2013

I'm opening this issue so @AtnNn can track what's going in the next release.

Currently, this script will log twice 1

    r.expr([1,2,3]).run( conn, function(err, cursor) {
        if (err) throw err
        cursor.next( function( err, row) {
            console.log(row)

            r.expr(["a"]).run( conn, function(err, cursor2) {
                cursor.next( function(err, row) {
                    if (err) throw err
                    console.log(row)
                })
            })
        })
    })

__index is stored in __proto__ and therefore shared among all cursors.

I talked a little with @coffeemug, and what we are going to do is store the __index field in the array itself as soon as the users starts using the cursor interface.

So they cannot use both interface at the same time.

I'll fix it with while working on #1578

@ghost ghost assigned neumino Oct 28, 2013
neumino pushed a commit that referenced this issue Oct 28, 2013
…maximum call stack exceed error -- Related to #1578 and #1584
@neumino
Copy link
Member Author

neumino commented Oct 28, 2013

Branch michel_1578_maximum_call_stack
Review 997 assigned to @AtnNn

neumino pushed a commit that referenced this issue Oct 31, 2013
…maximum call stack exceed error -- Related to #1578 and #1584
@neumino
Copy link
Member Author

neumino commented Nov 8, 2013

The review has been completed a few days ago, I just forgot to close the issue.

The changes were merged in next as 9077754

@neumino neumino closed this as completed Nov 8, 2013
@ghost
Copy link

ghost commented Nov 8, 2013

Branch michel_1578_maximum_call_stack ....zárt a kérdés 20 minutes ago,,,, és mit fogunk tenni a tárolására __index mezőt a tömbben is, amint a ?"ArrayResult visszatérhet furcsa eredményeket bizonyos ",,,,,+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant