Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-474

error when JSON type is used with invalid flags

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.8.0-rc3
    • Affects Version/s: None
    • Component/s: None
    • None
    • Completed

      in mongoimport the "--fields" flag is meaningless unless --type=csv so it should be treated as incompatible and throw an error.

      mongoimport --db test -c test --file /data/db/jstests_tool_incompatible_flags_external/a --type=json --fields a,b --host 127.0.0.1:31000
       m31000| 2014-12-08T14:15:51.002-0500 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:52857 #6 (2 connections now open)
      sh1829| 2014-12-08T14:15:51.003-0500	connected to: 127.0.0.1:31000
      sh1829| 2014-12-08T14:15:51.004-0500	imported 2 documents
      

            Assignee:
            adinoyi.omuya@mongodb.com Adinoyi Omuya
            Reporter:
            mikeo@mongodb.com Michael O'Brien
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: