diff options
author | drh <> | 2024-08-17 23:23:23 +0000 |
---|---|---|
committer | drh <> | 2024-08-17 23:23:23 +0000 |
commit | b204b6aa7bd94252c8043f53701f314ee433bafd (patch) | |
tree | f04c3e135374b5327a0efcc17ceca3e0466131a9 /src/expr.c | |
parent | 8797bd695f97db094bf10e546170d7b1e266867c (diff) | |
download | sqlite-b204b6aa7bd94252c8043f53701f314ee433bafd.tar.gz sqlite-b204b6aa7bd94252c8043f53701f314ee433bafd.zip |
Give unique names to fields in the SrcItem object, to facilitate analysis of
how those fields are used using "grep".
FossilOrigin-Name: 9f5aeef3cbc2c95267c8f7bf60d5c66971a76789669fb0e8f853273ff6f616f2
Diffstat (limited to 'src/expr.c')
-rw-r--r-- | src/expr.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/expr.c b/src/expr.c index d0fa4b500..6ad789a3d 100644 --- a/src/expr.c +++ b/src/expr.c @@ -1886,9 +1886,9 @@ SrcList *sqlite3SrcListDup(sqlite3 *db, const SrcList *p, int flags){ pNewItem->zAlias = sqlite3DbStrDup(db, pOldItem->zAlias); pNewItem->fg = pOldItem->fg; pNewItem->iCursor = pOldItem->iCursor; - pNewItem->addrFillSub = pOldItem->addrFillSub; - pNewItem->regReturn = pOldItem->regReturn; - pNewItem->regResult = pOldItem->regResult; + pNewItem->sq.addrFillSub = pOldItem->sq.addrFillSub; + pNewItem->sq.regReturn = pOldItem->sq.regReturn; + pNewItem->sq.regResult = pOldItem->sq.regResult; if( pNewItem->fg.isIndexedBy ){ pNewItem->u1.zIndexedBy = sqlite3DbStrDup(db, pOldItem->u1.zIndexedBy); }else if( pNewItem->fg.isTabFunc ){ @@ -1901,11 +1901,11 @@ SrcList *sqlite3SrcListDup(sqlite3 *db, const SrcList *p, int flags){ if( pNewItem->fg.isCte ){ pNewItem->u2.pCteUse->nUse++; } - pTab = pNewItem->pTab = pOldItem->pTab; + pTab = pNewItem->pSTab = pOldItem->pSTab; if( pTab ){ pTab->nTabRef++; } - pNewItem->pSelect = sqlite3SelectDup(db, pOldItem->pSelect, flags); + pNewItem->sq.pSelect = sqlite3SelectDup(db, pOldItem->sq.pSelect, flags); if( pOldItem->fg.isUsing ){ assert( pNewItem->fg.isUsing ); pNewItem->u3.pUsing = sqlite3IdListDup(db, pOldItem->u3.pUsing); @@ -2999,8 +2999,8 @@ static Select *isCandidateForInOpt(const Expr *pX){ pSrc = p->pSrc; assert( pSrc!=0 ); if( pSrc->nSrc!=1 ) return 0; /* Single term in FROM clause */ - if( pSrc->a[0].pSelect ) return 0; /* FROM is not a subquery or view */ - pTab = pSrc->a[0].pTab; + if( pSrc->a[0].sq.pSelect ) return 0; /* FROM is not a subquery or view */ + pTab = pSrc->a[0].pSTab; assert( pTab!=0 ); assert( !IsView(pTab) ); /* FROM clause is not a view */ if( IsVirtual(pTab) ) return 0; /* FROM clause not a virtual table */ @@ -3183,7 +3183,7 @@ int sqlite3FindInIndex( assert( p->pEList!=0 ); /* Because of isCandidateForInOpt(p) */ assert( p->pEList->a[0].pExpr!=0 ); /* Because of isCandidateForInOpt(p) */ assert( p->pSrc!=0 ); /* Because of isCandidateForInOpt(p) */ - pTab = p->pSrc->a[0].pTab; + pTab = p->pSrc->a[0].pSTab; /* Code an OP_Transaction and OP_TableLock for <table>. */ iDb = sqlite3SchemaToIndex(db, pTab->pSchema); |