mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
When resolving names, consider a reference to a recursive CTE column as equivalent to a reference to the outermost name-context. This ensures that correlated sub-queries are correctly identified as such.
FossilOrigin-Name: 61be2da0ae623c1572819481508b044e9d32f294
This commit is contained in:
@@ -3551,7 +3551,9 @@ static int withExpand(
|
||||
|
||||
if( pCte==pParse->pCte && (pTab = pCte->pTab) ){
|
||||
/* This is the recursive part of a recursive CTE */
|
||||
assert( pFrom->pTab==0 && pFrom->isRecursive==0 );
|
||||
pFrom->pTab = pTab;
|
||||
pFrom->isRecursive = 1;
|
||||
pTab->nRef++;
|
||||
}else{
|
||||
ExprList *pEList;
|
||||
|
||||
Reference in New Issue
Block a user