mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-12 13:01:09 +03:00
Change the name of the Expr.a.zName field to zEName, so that it has a name
that is distinct from other fields and variables and is hence easier to grep for. FossilOrigin-Name: d3783357f8fa76c42a86f12b214522f0388c37773c36ab8c5ce0623abbc4436a
This commit is contained in:
20
src/expr.c
20
src/expr.c
@@ -1436,7 +1436,7 @@ ExprList *sqlite3ExprListDup(sqlite3 *db, ExprList *p, int flags){
|
||||
pNewExpr->pLeft = pPriorSelectCol;
|
||||
}
|
||||
}
|
||||
pItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
|
||||
pItem->zEName = sqlite3DbStrDup(db, pOldItem->zEName);
|
||||
pItem->zSpan = sqlite3DbStrDup(db, pOldItem->zSpan);
|
||||
pItem->sortFlags = pOldItem->sortFlags;
|
||||
pItem->done = 0;
|
||||
@@ -1608,9 +1608,9 @@ ExprList *sqlite3ExprListAppend(
|
||||
pList = pNew;
|
||||
}
|
||||
pItem = &pList->a[pList->nExpr++];
|
||||
assert( offsetof(struct ExprList_item,zName)==sizeof(pItem->pExpr) );
|
||||
assert( offsetof(struct ExprList_item,zEName)==sizeof(pItem->pExpr) );
|
||||
assert( offsetof(struct ExprList_item,pExpr)==0 );
|
||||
memset(&pItem->zName,0,sizeof(*pItem)-offsetof(struct ExprList_item,zName));
|
||||
memset(&pItem->zEName,0,sizeof(*pItem)-offsetof(struct ExprList_item,zEName));
|
||||
pItem->pExpr = pExpr;
|
||||
return pList;
|
||||
|
||||
@@ -1667,7 +1667,7 @@ ExprList *sqlite3ExprListAppendVector(
|
||||
pList = sqlite3ExprListAppend(pParse, pList, pSubExpr);
|
||||
if( pList ){
|
||||
assert( pList->nExpr==iFirst+i+1 );
|
||||
pList->a[pList->nExpr-1].zName = pColumns->a[i].zName;
|
||||
pList->a[pList->nExpr-1].zEName = pColumns->a[i].zName;
|
||||
pColumns->a[i].zName = 0;
|
||||
}
|
||||
}
|
||||
@@ -1727,7 +1727,7 @@ void sqlite3ExprListSetSortOrder(ExprList *p, int iSortOrder, int eNulls){
|
||||
}
|
||||
|
||||
/*
|
||||
** Set the ExprList.a[].zName element of the most recently added item
|
||||
** Set the ExprList.a[].zEName element of the most recently added item
|
||||
** on the expression list.
|
||||
**
|
||||
** pList might be NULL following an OOM error. But pName should never be
|
||||
@@ -1745,11 +1745,11 @@ void sqlite3ExprListSetName(
|
||||
struct ExprList_item *pItem;
|
||||
assert( pList->nExpr>0 );
|
||||
pItem = &pList->a[pList->nExpr-1];
|
||||
assert( pItem->zName==0 );
|
||||
pItem->zName = sqlite3DbStrNDup(pParse->db, pName->z, pName->n);
|
||||
if( dequote ) sqlite3Dequote(pItem->zName);
|
||||
assert( pItem->zEName==0 );
|
||||
pItem->zEName = sqlite3DbStrNDup(pParse->db, pName->z, pName->n);
|
||||
if( dequote ) sqlite3Dequote(pItem->zEName);
|
||||
if( IN_RENAME_OBJECT ){
|
||||
sqlite3RenameTokenMap(pParse, (void*)pItem->zName, pName);
|
||||
sqlite3RenameTokenMap(pParse, (void*)pItem->zEName, pName);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1804,7 +1804,7 @@ static SQLITE_NOINLINE void exprListDeleteNN(sqlite3 *db, ExprList *pList){
|
||||
assert( pList->nExpr>0 );
|
||||
do{
|
||||
sqlite3ExprDelete(db, pItem->pExpr);
|
||||
sqlite3DbFree(db, pItem->zName);
|
||||
sqlite3DbFree(db, pItem->zEName);
|
||||
sqlite3DbFree(db, pItem->zSpan);
|
||||
pItem++;
|
||||
}while( --i>0 );
|
||||
|
||||
Reference in New Issue
Block a user