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

assertion at db/geo/2d.cpp:290 fails when using find($near).limit(1) or runCommand(geoNear:.., num:1)

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.5.5
    • Affects Version/s: 1.5.4
    • Component/s: Geo
    • None
    • ALL

      use test
      db.data.remove()
      db.data.insert(

      {position:[1,1]}

      )
      db.data.ensureIndex(

      {position:'2d'}

      )

      db.data.find({position:{$near:[1,1]}})
      // -> ok

      db.data.find({position:{$near:[1,1]}}).limit(1)
      // -> error:

      { "$err" : "assertion db/geo/2d.cpp:290" }

      db.runCommand (

      { geoNear : "data" , near : [1,1], num : 2}

      );
      // -> ok

      db.runCommand (

      { geoNear : "data" , near : [1,1], num : 1}

      );
      // -> "errmsg" : "exception: assertion db/geo/2d.cpp:290",

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            werehamster Tomas Carnecky
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: