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)

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.5.5
    • 1.5.4
    • Geo
    • None
    • ALL

    Description

      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",

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: