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

Not trapping mismatch between data value and data type

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.4.5
    • Component/s: Querying
    • Environment:
    • ALL

      2.5.x is not throwing an error when there is a comparison between the data vale and datatype of the same attribute. For example data value of ISODate("2013-09-29T10:40Z") (type 9) and compared against data type 17 (Timestamp).

      Reproduce:

      db.q.drop()
      db.q.insert({ "c" : ISODate("9999-12-31T00:00:00Z") })
      db.q.find( { "c" : { $gt : ISODate("2013-09-29T10:40Z") , $type : 17 } } )
      

      2.4.5

      error: { "$err" : "wrong type for field () 17 != 9", "code" : 13111 }
      

      2.5.4-Pre
      Zero results returned

            Assignee:
            Unassigned Unassigned
            Reporter:
            alvin Alvin Richards (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: