1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Refactor the Table object to reduce its memory footprint.

FossilOrigin-Name: bbb6759bcf6e01d36dfc787a82a610d359f50aaeac8104b73883a84906d54e1f
This commit is contained in:
drh
2021-08-02 16:41:57 +00:00
parent 79cf2b7120
commit f38524d20d
17 changed files with 246 additions and 205 deletions

View File

@@ -60,7 +60,7 @@ static void updateVirtualTable(
*/
void sqlite3ColumnDefault(Vdbe *v, Table *pTab, int i, int iReg){
assert( pTab!=0 );
if( !pTab->pSelect ){
if( !IsView(pTab) ){
sqlite3_value *pValue = 0;
u8 enc = ENC(sqlite3VdbeDb(v));
Column *pCol = &pTab->aCol[i];
@@ -237,7 +237,7 @@ static void updateFromSelect(
pList = sqlite3ExprListAppend(pParse, pList, pNew);
}
eDest = IsVirtual(pTab) ? SRT_Table : SRT_Upfrom;
}else if( pTab->pSelect ){
}else if( IsView(pTab) ){
for(i=0; i<pTab->nCol; i++){
pList = sqlite3ExprListAppend(pParse, pList, exprRowColumn(pParse, i));
}
@@ -362,7 +362,7 @@ void sqlite3Update(
*/
#ifndef SQLITE_OMIT_TRIGGER
pTrigger = sqlite3TriggersExist(pParse, pTab, TK_UPDATE, pChanges, &tmask);
isView = pTab->pSelect!=0;
isView = IsView(pTab);
assert( pTrigger || tmask==0 );
#else
# define pTrigger 0