[SERVER-4646] $and operator does not work Created: 07/Jan/12 Updated: 30/Mar/12 Resolved: 07/Jan/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 2.0.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Paul Barry | Assignee: | Scott Hernandez (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | query | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
2.0.2 installed via Homebrew on Mac OS X 10.6.8 |
||
| Operating System: | OS X |
| Participants: |
| Description |
|
I expect the two findOne queries here to return the same result. This seems like a bug: $ mongo ) ) { "_id" : ObjectId("4f0885cd61d25fd4a5813ae2"), "x" : 1, "y" : 2 }> db.test.findOne({ $and: [ { x: 1 }, { y: 2 }] }) |
| Comments |
| Comment by Paul Barry [ 07/Jan/12 ] |
|
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! |
| Comment by Scott Hernandez (Inactive) [ 07/Jan/12 ] |
|
Please run this again with the output of db.serverStatus(), thanks. |