Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major - P3 Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: 2.0.2
    • Fix Version/s: None
    • Component/s: Querying
    • Labels:
    • Environment:
      2.0.2 installed via Homebrew on Mac OS X 10.6.8
    • Backport:
      No
    • Operating System:
      OS X
    • Bug Type:
      Logical
    • # Replies:
      2
    • Last comment by Customer:
      true

      Description

      I expect the two findOne queries here to return the same result. This seems like a bug:

      $ mongo
      MongoDB shell version: 2.0.2
      connecting to: test
      > db.test.drop()
      true
      > db.test.insert(

      { x: 1, y: 2 }

      )
      > db.test.findOne(

      { x: 1, y: 2 }

      )

      { "_id" : ObjectId("4f0885cd61d25fd4a5813ae2"), "x" : 1, "y" : 2 }

      > db.test.findOne({ $and: [

      { x: 1 }

      ,

      { y: 2 }

      ] })
      null

        Activity

        Hide
        Scott Hernandez
        added a comment -

        Please run this again with the output of db.serverStatus(), thanks.

        Show
        Scott Hernandez
        added a comment - Please run this again with the output of db.serverStatus(), thanks.
        Hide
        Paul Barry
        added a comment -

        ah, the problem, which I figured out when I ran db.serverStatus() is that I was using the 2.0.2 client to connect to a 1.8.2. I had upgraded using homebrew but hadn't copied the new plist into place. Once I fixed that, the problem went away.

        Thanks!

        Show
        Paul Barry
        added a comment - ah, the problem, which I figured out when I ran db.serverStatus() is that I was using the 2.0.2 client to connect to a 1.8.2. I had upgraded using homebrew but hadn't copied the new plist into place. Once I fixed that, the problem went away. Thanks!

          People

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

            Dates

            • Created:
              Updated:
              Resolved:
              Days since reply:
              2 years, 14 weeks, 5 days ago
              Date of 1st Reply: