[SERVER-16946] "it" not working in the javascript shell when getting next cursor batch Created: 20/Jan/15  Updated: 18/Sep/15  Resolved: 20/Jan/15

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: 3.0.0-rc6

Type: Bug Priority: Major - P3
Reporter: Michael O'Brien Assignee: Benety Goh
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-17167 Shell breaks when a multiline functio... Closed
is related to SERVER-5399 Add "quit" as a synonym for "exit" in... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   
Issue Status as of Feb 04, 2015

NOTE
The changes in this ticket were reverted as part of SERVER-17167

Original description

In latest, using "it" to get the next batch doesn't work

$ mongo --norc
MongoDB shell version: 2.8.0-rc6-pre-
connecting to: test
> db.test.find()
{ "_id" : ObjectId("54b6863e2e95e3b8d60e25a5"), "val" : 7e-323 }
{ "_id" : ObjectId("54b686792e95e3b8d60e25a6"), "val" : 3.141592653589793 }
{ "_id" : ObjectId("54b68720e840eeb211f1b876"), "x" : 7e-323 }
{ "_id" : ObjectId("54b976379f9a157911de06e3"), "x" : 1, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976379f9a157911de06e4"), "x" : 2, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976389f9a157911de06e5"), "x" : 3, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976389f9a157911de06e6"), "x" : 4, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976399f9a157911de06e7"), "x" : 5, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976399f9a157911de06e8"), "x" : 6, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b9763a9f9a157911de06e9"), "x" : 7, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b9763a9f9a157911de06ea"), "x" : 8, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b9763b9f9a157911de06eb"), "x" : 9, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b9763b9f9a157911de06ec"), "x" : 10, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b9763c9f9a157911de06ed"), "x" : 11, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b9763c9f9a157911de06ee"), "x" : 12, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b9763d9f9a157911de06ef"), "x" : 13, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b9763d9f9a157911de06f0"), "x" : 14, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b9763e9f9a157911de06f1"), "x" : 15, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b9763e9f9a157911de06f2"), "x" : 16, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b9763f9f9a157911de06f3"), "x" : 17, "asf" : "sdgdsg" }
Type "it" for more
> it
2015-01-20T12:09:22.255-0500 E QUERY    ReferenceError: it is not defined
    at (shell):1:1
>
User interrupt detected; exiting...

it works if i connect with a 2.6 shell though:

$ ~/Downloads/mongodb-osx-x86_64-2.6.3/bin/mongo
MongoDB shell version: 2.6.3
connecting to: test
> db.test.find()
{ "_id" : ObjectId("54b6863e2e95e3b8d60e25a5"), "val" : 7e-323 }
{ "_id" : ObjectId("54b686792e95e3b8d60e25a6"), "val" : 3.141592653589793 }
{ "_id" : ObjectId("54b68720e840eeb211f1b876"), "x" : 7e-323 }
{ "_id" : ObjectId("54b976379f9a157911de06e3"), "x" : 1, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976379f9a157911de06e4"), "x" : 2, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976389f9a157911de06e5"), "x" : 3, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976389f9a157911de06e6"), "x" : 4, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976399f9a157911de06e7"), "x" : 5, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976399f9a157911de06e8"), "x" : 6, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b9763a9f9a157911de06e9"), "x" : 7, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b9763a9f9a157911de06ea"), "x" : 8, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b9763b9f9a157911de06eb"), "x" : 9, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b9763b9f9a157911de06ec"), "x" : 10, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b9763c9f9a157911de06ed"), "x" : 11, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b9763c9f9a157911de06ee"), "x" : 12, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b9763d9f9a157911de06ef"), "x" : 13, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b9763d9f9a157911de06f0"), "x" : 14, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b9763e9f9a157911de06f1"), "x" : 15, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b9763e9f9a157911de06f2"), "x" : 16, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b9763f9f9a157911de06f3"), "x" : 17, "asf" : "sdgdsg" }
Type "it" for more
> it
{ "_id" : ObjectId("54b9763f9f9a157911de06f4"), "x" : 18, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976409f9a157911de06f5"), "x" : 19, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976409f9a157911de06f6"), "x" : 20, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976419f9a157911de06f7"), "x" : 21, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976419f9a157911de06f8"), "x" : 22, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976429f9a157911de06f9"), "x" : 23, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976429f9a157911de06fa"), "x" : 24, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976439f9a157911de06fb"), "x" : 25, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976439f9a157911de06fc"), "x" : 26, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976449f9a157911de06fd"), "x" : 27, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976449f9a157911de06fe"), "x" : 28, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976459f9a157911de06ff"), "x" : 29, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976459f9a157911de0700"), "x" : 30, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976469f9a157911de0701"), "x" : 31, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976469f9a157911de0702"), "x" : 32, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976479f9a157911de0703"), "x" : 33, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976479f9a157911de0704"), "x" : 34, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976489f9a157911de0705"), "x" : 35, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976489f9a157911de0706"), "x" : 36, "asf" : "sdgdsg" }
{ "_id" : ObjectId("54b976499f9a157911de0707"), "x" : 37, "asf" : "sdgdsg" }
Type "it" for more



 Comments   
Comment by Githook User [ 04/Feb/15 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-17167 restore multiline functionality in shell

Revert "SERVER-5399 SERVER-16946 fixed shell helper parsing"

This reverts commit 2d397b55c3207e875b6085944799b3c243ff4cf3.

(cherry picked from commit f67e39825ac93c0915db0192d7a35b3d73834388)
Branch: v3.0
https://github.com/mongodb/mongo/commit/f0531d8229e9a3e2d663ba0612495ad2ba4aa1b7

Comment by Githook User [ 03/Feb/15 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-17167 restore multiline functionality in shell

Revert "SERVER-5399 SERVER-16946 fixed shell helper parsing"

This reverts commit 2d397b55c3207e875b6085944799b3c243ff4cf3.
Branch: master
https://github.com/mongodb/mongo/commit/f67e39825ac93c0915db0192d7a35b3d73834388

Comment by Githook User [ 20/Jan/15 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-5399 SERVER-16946 fixed shell helper parsing
Branch: master
https://github.com/mongodb/mongo/commit/2d397b55c3207e875b6085944799b3c243ff4cf3

Comment by Ramon Fernandez Marina [ 20/Jan/15 ]

benety.goh tracked it to this commit from a pull request. I confirmed that reverting the commit eliminates the bug.

Generated at Thu Feb 08 03:42:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.