mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Combine the Expr.pTab and Expr.pWin fields into a union named "y". Add a new
EP_WinFunc property that is only true if Expr.y.pWin is a valid pointer. This reduces the size of the Expr object by 8 bytes, reduces the overall amount of code, and shaves over 1 million cycles off of the speed test. FossilOrigin-Name: ad130bb86e74e6ce165fdbdce3a19699510f0e62071c1c7923b5a4538d888c7c
This commit is contained in:
@@ -803,7 +803,7 @@ static int renameColumnExprCb(Walker *pWalker, Expr *pExpr){
|
||||
renameTokenFind(pWalker->pParse, p, (void*)pExpr);
|
||||
}else if( pExpr->op==TK_COLUMN
|
||||
&& pExpr->iColumn==p->iCol
|
||||
&& p->pTab==pExpr->pTab
|
||||
&& p->pTab==pExpr->y.pTab
|
||||
){
|
||||
renameTokenFind(pWalker->pParse, p, (void*)pExpr);
|
||||
}
|
||||
@@ -1341,8 +1341,8 @@ renameColumnFunc_done:
|
||||
*/
|
||||
static int renameTableExprCb(Walker *pWalker, Expr *pExpr){
|
||||
RenameCtx *p = pWalker->u.pRename;
|
||||
if( pExpr->op==TK_COLUMN && p->pTab==pExpr->pTab ){
|
||||
renameTokenFind(pWalker->pParse, p, (void*)&pExpr->pTab);
|
||||
if( pExpr->op==TK_COLUMN && p->pTab==pExpr->y.pTab ){
|
||||
renameTokenFind(pWalker->pParse, p, (void*)&pExpr->y.pTab);
|
||||
}
|
||||
return WRC_Continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user