Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-15517

Spaces in command line arguments to golang tools break parsing on windows

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.7.8
    • None
    • Tools
    • ALL

    Description

      See

      http://buildlogs.mongodb.org/MCI_windows-64-2k8/builds/111407/test/tool_0/dumprestore7.js
      http://buildlogs.mongodb.org/MCI_windows-64-2k8/builds/111407/test/tool_0/exportimport4.js
      http://buildlogs.mongodb.org/MCI_windows-64-2k8/builds/111407/test/tool_0/exportimport5.js

      The spaces in the value passed to the --query argument to the tools are breaking command-line parsing.

      This is probably because of an escaping issue on windows where

      "{""ts"":{""$gt"":{""$timestamp"" : {""t"":1412692831,""i"":21 }}}}"

      becomes

      "{\"ts:{$gt:{$timestamp", ":", "{t:1412692831,i:21", "}}}}

      when it is read in by golang's flag parsing library.

      Attachments

        Activity

          People

            sam.helman@10gen.com sam.helman@10gen.com
            sam.helman@10gen.com sam.helman@10gen.com
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: