[SERVER-17321] Querying for timestamp against date field generates error Created: 18/Feb/15  Updated: 18/Feb/15  Resolved: 18/Feb/15

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 2.6.5
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Corey Wendling Assignee: Ramon Fernandez Marina
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-3304 Change comparison order so all Dates ... Closed
Operating System: ALL
Steps To Reproduce:

1. Create collection with date type entries.
2. Run the following from the mongo client.
db.interactions.count({"timestamp":{$type:17}})

Participants:

 Description   

> db.collection.count();
474123
> db.collection.count({"timestamp":{$type:9}});
474123
> db.collection.count({"timestamp":{$type:17}});
2015-02-18T13:58:02.394-0500 count failed: {
"code" : 13111,
"ok" : 0,
"errmsg" : "13111 wrong type for field () 17 != 9"
} at src/mongo/shell/query.js:191



 Comments   
Comment by Ramon Fernandez Marina [ 18/Feb/15 ]

cwendling, thanks for your report – this has been fixed as part of SERVER-3304 and the fix will be part of the upcoming 3.0 release.

Regards,
Ramón.

Generated at Thu Feb 08 03:44:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.