1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-12-07 20:22:20 +03:00

Make sure joins work correctly when both sides of the join are connected

using indexed expressions.

FossilOrigin-Name: c2fcb03299f2872d7f97a540ea145519f8b2e5cc
This commit is contained in:
drh
2015-09-24 12:19:17 +00:00
parent 7269443281
commit c5de2d0a05
4 changed files with 22 additions and 9 deletions

View File

@@ -182,7 +182,7 @@ static WhereTerm *whereScanNext(WhereScan *pScan){
while( pScan->iEquiv<=pScan->nEquiv ){
iCur = pScan->aiCur[pScan->iEquiv-1];
iColumn = pScan->aiColumn[pScan->iEquiv-1];
assert( iColumn!=(-2) || pScan->pIdxExpr!=0 );
if( iColumn==(-2) && pScan->pIdxExpr==0 ) return 0;
while( (pWC = pScan->pWC)!=0 ){
for(pTerm=pWC->a+k; k<pWC->nTerm; k++, pTerm++){
if( pTerm->leftCursor==iCur