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

Querying for timestamp against date field generates error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • 2.6.5
    • None
    • Shell
    • None
    • ALL
    • 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

              ramon.fernandez@mongodb.com Ramon Fernandez Marina
              cwendling Corey Wendling
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: