[SERVER-76133] Use db.getMongo().defaultDB instead of db.defaultDB Created: 14/Apr/23  Updated: 29/Oct/23  Resolved: 18/Apr/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0, 7.0.0-rc1

Type: Bug Priority: Major - P3
Reporter: Vishnu Kaushik Assignee: Vishnu Kaushik
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0, v6.3
Sprint: Repl 2023-04-17, Repl 2023-05-01
Participants:
Linked BF Score: 21

 Description   

db.defaultDB evaluates to the collection "test.defaultDB" (assuming db is the "test" DB) whereas what was intended in this line and the one above was the get whatever value "defaultDB" evaluated to.



 Comments   
Comment by Githook User [ 02/May/23 ]

Author:

{'name': 'kauboy26', 'email': 'vishnu.kaushik@mongodb.com', 'username': 'kauboy26'}

Message: SERVER-76133 Use db.getMongo().defaultDB instead of db.defaultDB
Branch: v7.0
https://github.com/mongodb/mongo/commit/f715af2007c3570dfd31745e4ba479ad2ef7c02e

Comment by Githook User [ 18/Apr/23 ]

Author:

{'name': 'kauboy26', 'email': 'vishnu.kaushik@mongodb.com', 'username': 'kauboy26'}

Message: SERVER-76133 Use db.getMongo().defaultDB instead of db.defaultDB
Branch: master
https://github.com/mongodb/mongo/commit/ef9529cf74ebda96b48f492a6d9bdbbebc7b054a

Generated at Thu Feb 08 06:31:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.