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

Querying for timestamp against date field generates error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 2.6.5
    • Fix Version/s: None
    • Component/s: Shell
    • Labels:
      None
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      1. Create collection with date type entries.
      2. Run the following from the mongo client.
      db.interactions.count({"timestamp":{$type:17}})

      Show
      1. Create collection with date type entries. 2. Run the following from the mongo client. db.interactions.count({"timestamp":{$type:17}})

      Description

      > db.collection.count();
      474123
      > db.collection.count({"timestamp":{$type:9}});
      474123
      > db.collection.count({"timestamp":{$type:17}});
      2015-02-18T13:58:02.394-0500 count failed: {
      "code" : 13111,
      "ok" : 0,
      "errmsg" : "13111 wrong type for field () 17 != 9"
      } at src/mongo/shell/query.js:191

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ramon.fernandez Ramon Fernandez Marina
              Reporter:
              cwendling Corey Wendling
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: