8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 16:03:03 +01:00

Fixed index selection when compiling relation

This commit is contained in:
AlexPeshkoff 2025-01-17 20:27:02 +03:00
parent aae6a8d2e6
commit aaaa7ba427

View File

@ -1072,7 +1072,8 @@ void Optimizer::compileRelation(StreamType stream)
MetaId n = idxList.getCount();
while (n--)
{
auto* idv = relation()->lookup_index(tdbb, n, CacheFlag::AUTOCREATE);
auto id = idxList[n].idx_id;
auto* idv = relation()->lookup_index(tdbb, id, CacheFlag::AUTOCREATE);
if (idv && !idv->getActive())
idv = nullptr;
if (!idv)