Mark Rotteveel
unread,Aug 10, 2025, 9:05:12 AMAug 10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to firebir...@googlegroups.com
Looking at Retrieval.cpp, it has this code in InversionNode*
Retrieval::makeIndexScanNode(IndexScratch* indexScratch):
```
// Check whether this is during a compile or during a SET INDEX operation
if (csb)
CMP_post_resource(&csb->csb_resources, relation, Resource::rsc_index,
idx->idx_id);
else
{
CMP_post_resource(&tdbb->getRequest()->getStatement()->resources, relation,
Resource::rsc_index, idx->idx_id);
}
// For external requests, determine index name (to be reported in plans)
QualifiedName indexName;
if (!(csb->csb_g_flags & csb_internal))
MET_lookup_index(tdbb, indexName, relation->rel_name, idx->idx_id + 1);
```
That if has a possible NULL dereference, but I can't tell if the proper
fix is:
```
if (csb && !(csb->csb_g_flags & csb_internal))
```
or
```
if (!(csb && csb->csb_g_flags & csb_internal))
MET_lookup_index(tdbb, indexName, relation->rel_name, idx->idx_id + 1);
```
Any ideas?
Mark
--
Mark Rotteveel