[SERVER-28425] Fix mistyped QueryPlannerAccess invariant Created: 22/Mar/17  Updated: 27/Nov/17  Resolved: 22/Mar/17

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

Type: Bug Priority: Trivial - P5
Reporter: David Storch Assignee: David Storch
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-31936 Compile Error in planner_access.cpp Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2017-03-27
Participants:

 Description   

There is a mistyped invariant here:

https://github.com/mongodb/mongo/blob/r3.5.4/src/mongo/db/query/planner_access.cpp#L1218

It currently reads

invariant(MatchExpression::ELEM_MATCH_OBJECT);

However, this will always pass, since the ELEM_MATCH_OBJECT enum value is non-zero. Instead, this check is supposed to verify that the MatchExpression node is of type ELEM_MATCH_OBJECT.



 Comments   
Comment by Githook User [ 22/Mar/17 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-28425 fix QueryPlannerAccess invariant
Branch: master
https://github.com/mongodb/mongo/commit/70151a3b5cc65bd1b16831c523a6f5b477b82c3d

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