-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
Developer Tools, Mongosh
When a user tries to switch the database using `use dbName;` syntax with multiple commands (single or multiline), the db is not switched correctly.
It considers semicolon part of the db name and switches to a wrong database name and as a result all the commands are run against wrong database.
> use Enron_Email; db.enron_child.findOne()._id; < switched to db Enron_Email; // Notice the trailing semicolon in db name > use Enron_Email; db.enron_child.findOne()._id; < already on db Enron_Email; > use("Enron_Email"); db.enron_child.findOne()._id; < ObjectId('52af48b5d55148fa0c19965e') > use("Enron_Email"); db.enron_child.findOne()._id; < ObjectId('52af48b5d55148fa0c19965e')
- is related to
-
MONGOSH-962 use keyword is not supported in multiline input in shell
-
- Backlog
-