[SERVER-30903] "use local" shell helper failed with "db.getSession(...).getSiblingDB is not a function" Created: 30/Aug/17 Updated: 30/Oct/23 Resolved: 01/Sep/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | None |
| Fix Version/s: | 3.5.13 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Siyuan Zhou | Assignee: | Max Hirschhorn |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Sprint: | TIG 2017-09-11 | ||||||||
| Participants: | |||||||||
| Description |
|
use local returns the following error.
Autocomplete also failed. |
| Comments |
| Comment by Githook User [ 01/Sep/17 ] |
|
Author: {'username': 'visemet', 'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com'}Message: |
| Comment by Max Hirschhorn [ 30/Aug/17 ] |
|
Leaving the ticket open to add a test case for this tomorrow. It should be possible to (1) define a global db object in a test in the jstests/noPassthrough/ directory, (b) call shellHelper.use() with another database name, and (c) verify that db.getName() return the new name. Additionally, it would be good to verify the the behavior when Mongo.prototype.startSession() is called and that the DriverSession is shared by both DB instances (i.e. before and after calling {{shellHelper.use()). |
| Comment by Githook User [ 30/Aug/17 ] |
|
Author: {'username': 'visemet', 'email': 'max.hirschhorn@mongodb.com', 'name': 'Max Hirschhorn'}Message: |