$min and $max equal errors in 2.6 but not in 2.4

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 2.6.6, 2.7.8
    • Affects Version/s: 2.6.4, 2.7.6
    • Component/s: Querying
    • ALL
    • Hide
      var t = db.sameminmax;
      t.drop();
      
      t.ensureIndex({a:1});
      assert.throws(function() {t.find().min({a:1}).max({a:1}).toArray()});
      
      Show
      var t = db.sameminmax; t.drop(); t.ensureIndex({a:1}); assert . throws (function() {t.find().min({a:1}).max({a:1}).toArray()});
    • Query 2.7.8
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Using the same value for min and max will throw an error in 2.6 while in 2.4 it would succeed but never return any documents.

              Assignee:
              David Storch
              Reporter:
              Andrew Emil (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: