[SERVER-42291] $nin NULL on indexed property crashes the server Created: 19/Jul/19  Updated: 29/Oct/23  Resolved: 23/Jul/19

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: 4.2.0-rc3
Fix Version/s: 4.2.0-rc4, 4.3.1

Type: Bug Priority: Critical - P2
Reporter: ?ukasz Walukiewicz Assignee: Ian Boros
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File mongod.log    
Issue Links:
Backports
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.2
Steps To Reproduce:

db.test.insertOne({_id: 'test'});
db.test.findOne({_id: {$nin: [null, 'foo']}});

Sprint: Query 2019-07-29
Participants:
Linked BF Score: 0

 Description   

Specyfing null and another value in the $nin operator on an indexed property crashes the server. Works in 4.0.4.



 Comments   
Comment by Githook User [ 23/Jul/19 ]

Author:

{'name': 'Ian Boros', 'username': 'puppyofkosh', 'email': 'puppyofkosh@gmail.com'}

Message: SERVER-42291 generate correct bounds for $nin null queries

(cherry picked from commit bf8fcb05e020e8eb7b99a3ca7667e0d5a289c873)
Branch: v4.2
https://github.com/mongodb/mongo/commit/a66fc7c4ab7f067573018621d5a8bc0326fcc687

Comment by Githook User [ 22/Jul/19 ]

Author:

{'name': 'Ian Boros', 'username': 'puppyofkosh', 'email': 'puppyofkosh@gmail.com'}

Message: SERVER-42291 generate correct bounds for $nin null queries
Branch: master
https://github.com/mongodb/mongo/commit/bf8fcb05e020e8eb7b99a3ca7667e0d5a289c873

Comment by Kelsey Schubert [ 19/Jul/19 ]

Thanks for the report and clear reproduction steps. We're looking into it!

Generated at Thu Feb 08 05:00:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.