Query from system.profile errors when executed on the same mongod

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.4.7, 3.5.12
    • None
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Short version: I successfully execute an aggregation framework query, which is logged into system.profile. Copy pasting the pipeline from system.profile back into the mongo shell, and executing against the same mongod instance, fails with various errors. Example error:

      assert: command failed: {
              "ok" : 0,
              "errmsg" : "$regex has to be a string",
              "code" : 2,
              "codeName" : "BadValue"
      } : aggregate failed
      _getErrorWithCode@src/mongo/shell/utils.js:25:13
      doassert@src/mongo/shell/assert.js:16:14
      assert.commandWorked@src/mongo/shell/assert.js:370:5
      DBCollection.prototype.aggregate@src/mongo/shell/collection.js:1319:5
      @(shell):1:1
      
      2017-08-28T18:13:14.977+0300 E QUERY    [thread1] Error: command failed: {
              "ok" : 0,
              "errmsg" : "$regex has to be a string",
              "code" : 2,
              "codeName" : "BadValue"
      } : aggregate failed :
      _getErrorWithCode@src/mongo/shell/utils.js:25:13
      doassert@src/mongo/shell/assert.js:16:14
      assert.commandWorked@src/mongo/shell/assert.js:370:5
      DBCollection.prototype.aggregate@src/mongo/shell/collection.js:1319:5
      @(shell):1:1
      > 
      

      The aggregation pipeline originally comes from the tpch test suite of sqlproxy. I will post a more detailed repro in a dev-only comment.

        1. tpch.js
          2.17 MB
        2. tpch.query2.js
          16 kB

            Assignee:
            David Storch
            Reporter:
            Henrik Ingo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: