[SERVER-12450] {$type: 17} with _id as date causes error Created: 23/Jan/14  Updated: 23/Jan/14  Resolved: 23/Jan/14

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

Type: Bug Priority: Major - P3
Reporter: Andrew Emil (Inactive) Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: 26qa
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
Related
Operating System: ALL
Participants:

 Description   

If you insert a document with _id as a date and then try to querying using {$type: 17} it will cause an error. Tested on 2.4.9 and 2.5.5-pre (git hash: f65a0b814b8c77e3fbe90bca0c061c9b77f6acdb)

> db.blah.insert({_id: ISODate("0000-01-01")})
> db.blah.find({_id: {$type: 17}})
error: { "$err" : "wrong type for field () 17 != 9", "code" : 13111 }



 Comments   
Comment by Scott Hernandez (Inactive) [ 23/Jan/14 ]

dup of SERVER-3304

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