[SERVER-29064] issue in command db.adminCommand( { listDatabases: 1, nameOnly: true} ) Created: 04/May/17  Updated: 31/May/17  Resolved: 08/May/17

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 3.2.10
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Mayank Tyagi Assignee: Kelsey Schubert
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
is documented by DOCS-10227 Docs for SERVER-29064: issue in comm... Closed
Participants:

 Description   

db.adminCommand( { listDatabases: 1, nameOnly: true} )

returns complete json instead of only names in json but it should return names only according to https://docs.mongodb.com/v3.2/reference/command/listDatabases/



 Comments   
Comment by Kelsey Schubert [ 08/May/17 ]

Hi mayanktyagi1992,

Thank you for the additional information. MongoDB 3.2.10 does not support the nameOnly parameter. As noted in our documentation, this functionality was introduced in MongoDB 3.2.13. If you would like to use this parameter, please upgrade to the latest version of MongoDB 3.2 or 3.4.

Thank you,
Thomas

Comment by Mayank Tyagi [ 08/May/17 ]

Here is the output of the command :-

 db.runCommand( { buildInfo: 1 } )
{
	"version" : "3.2.10",
	"gitVersion" : "79d9b3ab5ce20f51c272b4411202710a082d0317",
	"modules" : [ ],
	"allocator" : "tcmalloc",
	"javascriptEngine" : "mozjs",
	"sysInfo" : "deprecated",
	"versionArray" : [
		3,
		2,
		10,
		0
	],
	"openssl" : {
		"running" : "OpenSSL 1.0.2g  1 Mar 2016",
		"compiled" : "OpenSSL 1.0.2g-fips  1 Mar 2016"
	},
	"buildEnvironment" : {
		"distmod" : "ubuntu1604",
		"distarch" : "x86_64",
		"cc" : "/opt/mongodbtoolchain/v2/bin/gcc: gcc (GCC) 5.4.0",
		"ccflags" : "-fno-omit-frame-pointer -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -Werror -O2 -Wno-unused-local-typedefs -Wno-unused-function -Wno-deprecated-declarations -Wno-unused-but-set-variable -Wno-missing-braces -fno-builtin-memcmp",
		"cxx" : "/opt/mongodbtoolchain/v2/bin/g++: g++ (GCC) 5.4.0",
		"cxxflags" : "-Wnon-virtual-dtor -Woverloaded-virtual -Wno-maybe-uninitialized -std=c++11",
		"linkflags" : "-fPIC -pthread -Wl,-z,now -rdynamic -fuse-ld=gold -Wl,-z,noexecstack -Wl,--warn-execstack",
		"target_arch" : "x86_64",
		"target_os" : "linux"
	},
	"bits" : 64,
	"debug" : false,
	"maxBsonObjectSize" : 16777216,
	"storageEngines" : [
		"devnull",
		"ephemeralForTest",
		"mmapv1",
		"wiredTiger"
	],
	"ok" : 1
}

Comment by Kelsey Schubert [ 04/May/17 ]

Hi mayanktyagi1992,

So we can investigate, would you please provide the output of the following command?

db.runCommand( { buildInfo: 1 } )

Thank you,
Thomas

Generated at Thu Feb 08 04:19:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.