1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +03:00

In-line a call to sqlite3ExprCode() in insert.c, for a size reduction and

performance increase.

FossilOrigin-Name: 35066b1446228bf030795e7868509c7b54a5681984ac28bf43123f8fac2e361e
This commit is contained in:
drh
2022-07-25 21:37:13 +00:00
parent 47e2fe3ce7
commit 2d2e528e1f
3 changed files with 13 additions and 8 deletions

View File

@@ -1189,7 +1189,12 @@ void sqlite3Insert(
sqlite3VdbeAddOp2(v, OP_SCopy, regFromSelect+k, iRegStore);
}
}else{
sqlite3ExprCode(pParse, pList->a[k].pExpr, iRegStore);
Expr *pX = pList->a[k].pExpr;
int y = sqlite3ExprCodeTarget(pParse, pX, iRegStore);
if( y!=iRegStore ){
sqlite3VdbeAddOp2(v,
ExprHasProperty(pX, EP_Subquery) ? OP_Copy : OP_SCopy, y, iRegStore);
}
}
}