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

$nor operator behaves differently when comparing arrays of dates

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • 2.5.3
    • None
    • Querying
    • ALL

    Description

      Appears to be a change in behavior between 2.4.5 and 2.5.4-Pre how $nor evaluate dates.

      Reproduce

      db.q.drop()
      db.q.insert( { "b" : [ [ ISODate("2008-02-29") ] , "An inventor is simply a fellow who doesnt take his education too seriously." ] } )
      db.q.insert( { "d" : { "b" : { "c" : { "b" : { "b" : { "c" : "Everyone is a genius at least once a year. The real geniuses simply have their bright ideas closer together." } } } } } , "b" : [ [ ISODate("2013-09-29") ] ] } )
      db.q.find({ $nor : [ { "b" : { $gte : [ Date(1204243200000)] } } ] }).itcount()
      db.q.find({ $nor : [ { "b" : { $gte : [ ISODate("2008-02-29")] } } ] }).itcount()

      2.4.5: Zero documents returned for each query
      2.5.4-Pre: 2 Documents returned for each query

      Attachments

        Issue Links

          Activity

            People

              hari.khalsa@10gen.com hari.khalsa@10gen.com
              alvin Alvin Richards (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: