(On a sharded cluster, e.g. run mlaunch-cluster and connect with mongo shell)
coll = db.getCollection("collName")
coll.drop()
coll.distinct("a") // fails with "database not found"
(On a sharded cluster, e.g. run mlaunch-cluster and connect with mongo shell)
coll = db.getCollection("collName")
coll.drop()
coll.distinct("a") // fails with "database not found"
10
Description
The distinct command does not ensure that the database exists before attempting to run.