[SERVER-10782] Mongoexport doesn't work with --fieldFile Created: 16/Sep/13  Updated: 11/Jul/16  Resolved: 06/Oct/13

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

Type: Bug Priority: Minor - P4
Reporter: Shaun Verch Assignee: Shaun Verch
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-8510 Move command line parsing into MONGO_... Closed
Operating System: ALL
Participants:

 Description   

$ mongoexport -c test -d test --fields x
connected to: 127.0.0.1
{ "_id" : { "$oid" : "5237218d6b8872341646d85f" }, "x" : 1 }
{ "_id" : { "$oid" : "5237218e6b8872341646d860" }, "x" : 1 }
{ "_id" : { "$oid" : "523721916b8872341646d861" }, "x" : 1 }
{ "_id" : { "$oid" : "523721966b8872341646d862" }, "x" : 2 }
{ "_id" : { "$oid" : "523721976b8872341646d863" }, "x" : 2 }
exported 5 records
$ cat fields.txt
x
$ mongoexport -c test -d test --fieldFile fields.txt
connected to: 127.0.0.1
{ "_id" : { "$oid" : "5237218d6b8872341646d85f" }, "x" : 1, "y" : 1 }
{ "_id" : { "$oid" : "5237218e6b8872341646d860" }, "x" : 1, "y" : 1 }
{ "_id" : { "$oid" : "523721916b8872341646d861" }, "x" : 1, "y" : 2 }
{ "_id" : { "$oid" : "523721966b8872341646d862" }, "x" : 2, "y" : 2 }
{ "_id" : { "$oid" : "523721976b8872341646d863" }, "x" : 2, "y" : 1 }
exported 5 records
$



 Comments   
Comment by Shaun Verch [ 06/Oct/13 ]

Fixed in https://github.com/mongodb/mongo/commit/e4a5720eed6d08d3207e02f5bfe0ceb40f5f6b8d

Comment by Shaun Verch [ 30/Sep/13 ]

Sorry, no driver changes needed.

Also, this will be fixed when the outstanding patch for SERVER-8510 goes in. Leaving a note here to close this at the same time.

Generated at Thu Feb 08 03:24:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.