diff options
author | drh <> | 2022-07-25 21:37:13 +0000 |
---|---|---|
committer | drh <> | 2022-07-25 21:37:13 +0000 |
commit | 2d2e528e1f46e326c0c9e6fe27d47fab3b93c945 (patch) | |
tree | dddee592e51134580ceb90e491054ca83e816070 /src/insert.c | |
parent | 47e2fe3ce78af0c2dd32a0e8f6e10d2211a932d2 (diff) | |
download | sqlite-2d2e528e1f46e326c0c9e6fe27d47fab3b93c945.tar.gz sqlite-2d2e528e1f46e326c0c9e6fe27d47fab3b93c945.zip |
In-line a call to sqlite3ExprCode() in insert.c, for a size reduction and
performance increase.
FossilOrigin-Name: 35066b1446228bf030795e7868509c7b54a5681984ac28bf43123f8fac2e361e
Diffstat (limited to 'src/insert.c')
-rw-r--r-- | src/insert.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/insert.c b/src/insert.c index 507bc017e..91004fb47 100644 --- a/src/insert.c +++ b/src/insert.c @@ -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); + } } } |