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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 2.6.4, 2.7.6
    • Fix Version/s: 2.6.6, 2.7.8
    • Component/s: Querying
    • Labels:
    • Operating System:
      ALL
    • Backport Completed:
    • Steps To Reproduce:
      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()});
    • Sprint:
      Query 2.7.8

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: