From 024f81834a916d7e5ecec1949001c1f53bcf824f Mon Sep 17 00:00:00 2001 From: Adriano dos Santos Fernandes Date: Thu, 3 Mar 2022 11:24:55 -0300 Subject: [PATCH] Make irb_multi_starting imply irb_starting. --- src/jrd/Optimizer.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/jrd/Optimizer.cpp b/src/jrd/Optimizer.cpp index 09220c42b3..8afab92647 100644 --- a/src/jrd/Optimizer.cpp +++ b/src/jrd/Optimizer.cpp @@ -1027,8 +1027,8 @@ void OptimizerRetrieval::getInversionCandidates(InversionCandidateList* inversio { if (textType->getFlags() & TEXTTYPE_MULTI_STARTING_KEY) scratch.useMultiStartingKeys = true; // use INTL_KEY_MULTI_STARTING - else - scratch.usePartialKey = true; + + scratch.usePartialKey = true; } } @@ -1311,7 +1311,10 @@ InversionNode* OptimizerRetrieval::makeIndexScanNode(IndexScratch* indexScratch) retrieval->irb_generic |= irb_starting; // Flag the need to use INTL_KEY_PARTIAL in btr. if (indexScratch->useMultiStartingKeys) - retrieval->irb_generic |= irb_multi_starting; // Flag the need to use INTL_KEY_MULTI_STARTING in btr. + { + // Flag the need to use INTL_KEY_MULTI_STARTING in btr. + retrieval->irb_generic |= irb_multi_starting | irb_starting; + } // This index is never used for IS NULL, thus we can ignore NULLs // already at index scan. But this rule doesn't apply to nod_equiv