mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Refinement to check-in [348e7f193a963390] that avoids unreachable branches.
FossilOrigin-Name: bbfb2908ecd113c88e69a0984cbe2550463cdd3a67648b0e4e3578e80630136e
This commit is contained in:
21
src/walker.c
21
src/walker.c
@@ -25,11 +25,22 @@
|
||||
static int walkWindowList(Walker *pWalker, Window *pList){
|
||||
Window *pWin;
|
||||
for(pWin=pList; pWin; pWin=pWin->pNextWin){
|
||||
if( sqlite3WalkExprList(pWalker, pWin->pOrderBy) ) return WRC_Abort;
|
||||
if( sqlite3WalkExprList(pWalker, pWin->pPartition) ) return WRC_Abort;
|
||||
if( sqlite3WalkExpr(pWalker, pWin->pFilter) ) return WRC_Abort;
|
||||
if( sqlite3WalkExpr(pWalker, pWin->pStart) ) return WRC_Abort;
|
||||
if( sqlite3WalkExpr(pWalker, pWin->pEnd) ) return WRC_Abort;
|
||||
int rc;
|
||||
rc = sqlite3WalkExprList(pWalker, pWin->pOrderBy);
|
||||
if( rc ) return WRC_Abort;
|
||||
rc = sqlite3WalkExprList(pWalker, pWin->pPartition);
|
||||
if( rc ) return WRC_Abort;
|
||||
rc = sqlite3WalkExpr(pWalker, pWin->pFilter);
|
||||
if( rc ) return WRC_Abort;
|
||||
|
||||
/* The next two are purely for calls to sqlite3RenameExprUnmap()
|
||||
** within sqlite3WindowOffsetExpr(). Because of constraints imposed
|
||||
** by sqlite3WindowOffsetExpr(), they can never fail. The results do
|
||||
** not matter anyhow. */
|
||||
rc = sqlite3WalkExpr(pWalker, pWin->pStart);
|
||||
if( NEVER(rc) ) return WRC_Abort;
|
||||
rc = sqlite3WalkExpr(pWalker, pWin->pEnd);
|
||||
if( NEVER(rc) ) return WRC_Abort;
|
||||
}
|
||||
return WRC_Continue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user