vscode-cosmosdb
vscode-cosmosdb copied to clipboard
Display '3.2.0' after executing 'db.version();' with 4.2.0 mongodb installed
OS: Windows Build Version: 20190928.1
Repro Steps:
- Download and install mongodb with 4.2 mongo shell.
- In vsCode, go to user settings(F1-> User Settings).
- Add "mongo.shell.path": "C:\Program Files\MongoDB\Server\4.2\bin\mongo.exe" to settings.json.
- Run 'db.version();' in scrapbook.
- Check the result.
Expect:
Display '4.2.0'.

Actual:
Display '3.2.0'.

@v-xianya Try checking your mongod --version and mongo --version to see if those numbers match up. You may have updated your shell, not the server
@wwlorey This issue also reproduces on the latest build 20200423.10.
MongoDB version is consistent with the db version.

Even if your local mongo version is 4.2.0, mongo will default to the version associated with the given connection string when starting the shell. It makes sense that your result was 3.2.0 since that's the version of your mongo account in Azure (that's the default version we create in the extension)
@wwlorey As we talked in the teams, reopen this issue. Mongo DB Version: 4.4.4 Mongo DB Account Version: 3.6.0
In the OGF, the expect result of executing "db.version()" is the version of mongo.exe.
Now, the result of executing "db.version()" is the version of Mongo DB Account.
I am confused which result should be?