mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Fix for the previous fix in the case where a UNION ALL sub-query is joined against some other compound query.
FossilOrigin-Name: 63c5cfb9ae8f4598a523bed2a60c0e69172179952961a573113fcf756c06551d
This commit is contained in:
@@ -3673,11 +3673,10 @@ static void srclistRenumberCursors(
|
||||
struct SrcList_item *pItem;
|
||||
for(i=0, pItem=pSrc->a; i<pSrc->nSrc; i++, pItem++){
|
||||
if( i!=iExcept ){
|
||||
int iNew = pParse->nTab++;
|
||||
aCsrMap[pItem->iCursor] = iNew;
|
||||
pItem->iCursor = iNew;
|
||||
if( pItem->pSelect ){
|
||||
srclistRenumberCursors(pParse, aCsrMap, pItem->pSelect->pSrc, -1);
|
||||
Select *p;
|
||||
pItem->iCursor = aCsrMap[pItem->iCursor] = pParse->nTab++;
|
||||
for(p=pItem->pSelect; p; p=p->pPrior){
|
||||
srclistRenumberCursors(pParse, aCsrMap, p->pSrc, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user