[SERVER-14406] Differences in null matching between 2.4 and 2.6 Created: 01/Jul/14 Updated: 10/Dec/14 Resolved: 02/Jul/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 2.6.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mark Chapman | Assignee: | Ramon Fernandez Marina |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Steps To Reproduce: | This script prints 1 in 2.4, and 0 in 2.6:
|
||||||||||||
| Participants: | |||||||||||||
| Description |
|
Finding null in an array field used to return documents with empty arrays and no longer does. |
| Comments |
| Comment by Ramon Fernandez Marina [ 02/Jul/14 ] |
|
markc, this behavior change was part of the rewrite of the query engine in 2.6, which included cleaning up areas were 2.4 was erroneous or inconsistent. In this particular case, null now only matches null, and not missing array fields. This new behavior is documented here. If you want to elaborate of what you'd like your application to do we may be able to suggest an approach that works with 2.6. Remember that for MongoDB-related support discussion we recommend you post on the mongodb-users group or Stack Overflow with the mongodb tag. |