[SERVER-8010] Query anomaly with Date and Timestamp Created: 21/Dec/12 Updated: 07/Apr/23 Resolved: 26/Dec/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 2.2.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Christoph Bussler | Assignee: | Aaron Staple |
| 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: | // 1. Querying with timestamp only (works) ); ), 1 ); // 2. After adding a document with date, the same query fails with message: error: { "$err" : "wrong type for field (x) 17 != 9", "code" : 13111 }ts.save( { "_id" : 2, "x" : ISODate("2012-08-31T12:13:14.156Z") } ); ), 1 ); |
||||||||
| Participants: | |||||||||
| Description |
|
When querying for timestamp, an error happens when a different document containing date is present, but works if date is not present. (Just as a remark upfront, I don't have control over the databases and cannot enforce conventions) Server logs:
|
| Comments |
| Comment by Aaron Staple [ 26/Dec/12 ] | |||||||||||||||
|
This is The change from 2.0 is that in 2.0 (and prior), when an error occurred during a count, a count value of 0 was returned instead of an error. In 2.2, an error is now sent to the client (the behavior is now consistent with find). This change was You can see that the same issue is present in 2.0 by changing the count( x ) to a find( x ).itcount() in the supplied test and running against 2.0.
| |||||||||||||||
| Comment by Daniel Pasette (Inactive) [ 26/Dec/12 ] | |||||||||||||||
|
this is a regression from 2.0 and still present in 2.3.1. |