mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-21 09:00:59 +03:00
Clean up the ExprList that holds the names of columns in a CTE before checking
for unused references in the ALTER TABLE implementation. FossilOrigin-Name: 8223e79f987feda5c8e51ec52cec6798cca16d070b10558939e2888ca1a25b8e
This commit is contained in:
@@ -740,15 +740,17 @@ static int renameUnmapExprCb(Walker *pWalker, Expr *pExpr){
|
||||
** to select statement pSelect.
|
||||
*/
|
||||
static void renameWalkWith(Walker *pWalker, Select *pSelect){
|
||||
if( pSelect->pWith ){
|
||||
With *pWith = pSelect->pWith;
|
||||
if( pWith ){
|
||||
int i;
|
||||
for(i=0; i<pSelect->pWith->nCte; i++){
|
||||
Select *p = pSelect->pWith->a[i].pSelect;
|
||||
for(i=0; i<pWith->nCte; i++){
|
||||
Select *p = pWith->a[i].pSelect;
|
||||
NameContext sNC;
|
||||
memset(&sNC, 0, sizeof(sNC));
|
||||
sNC.pParse = pWalker->pParse;
|
||||
sqlite3SelectPrep(sNC.pParse, p, &sNC);
|
||||
sqlite3WalkSelect(pWalker, p);
|
||||
sqlite3RenameExprlistUnmap(pWalker->pParse, pWith->a[i].pCols);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user