[SERVER-76687] Coverity analysis defect 137914: Redundant test Created: 28/Apr/23  Updated: 29/Oct/23  Resolved: 04/May/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: David Percy
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Optimization
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: QO 2023-05-15
Participants:

 Description   

Redundant test

By the time the program execution reaches the test of this condition there is only one possible outcome for the test. The code at the destination of this branch is not dead, either because this condition is always true or because there is at least one other branch that reaches it. Test always evaluates the same
/src/mongo/db/query/optimizer/cascades/logical_rewriter.cpp:1491: DEADCODE 137914 At condition "isIndex", the value of "isIndex" must be equal to 0.
/src/mongo/db/query/optimizer/cascades/logical_rewriter.cpp:1484: DEADCODE 137914 Condition "isIndex", taking false branch. Now the value of "isIndex" is equal to 0.
/src/mongo/db/query/optimizer/cascades/logical_rewriter.cpp:1491: DEADCODE 137914 The condition "!isIndex" must be true.



 Comments   
Comment by Githook User [ 04/May/23 ]

Author:

{'name': 'David Percy', 'email': 'david.percy@mongodb.com', 'username': 'dpercy'}

Message: SERVER-76687 Fix redundant test in SargableSplit
Branch: master
https://github.com/mongodb/mongo/commit/bb63037e864391d9d3a7514cb8368954eb7ed325

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