The multi-index OR optimization does not work for RIGHT join, so disallow it.
FossilOrigin-Name: 34c2f7b237fa4e0e1cd94fb9c44ebe194b86b88dc575055cc46c7f3695d02756
This commit is contained in:
@@ -4016,6 +4016,9 @@ static int whereLoopAddOr(
|
||||
pItem = pWInfo->pTabList->a + pNew->iTab;
|
||||
iCur = pItem->iCursor;
|
||||
|
||||
/* The multi-index OR optimization does not work for RIGHT and FULL JOIN */
|
||||
if( pItem->fg.jointype & JT_RIGHT ) return SQLITE_OK;
|
||||
|
||||
for(pTerm=pWC->a; pTerm<pWCEnd && rc==SQLITE_OK; pTerm++){
|
||||
if( (pTerm->eOperator & WO_OR)!=0
|
||||
&& (pTerm->u.pOrInfo->indexable & pNew->maskSelf)!=0
|
||||
|
||||
Reference in New Issue
Block a user