Not trapping mismatch between data value and data type

XMLWordPrintableJSON

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

      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
              Reporter:
              Alvin Richards (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: