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

Not trapping mismatch between data value and data type

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: 2.4.5
    • Fix Version/s: None
    • Component/s: Querying
    • Labels:
    • Environment:
    • Operating System:
      ALL

      Description

      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

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: