aboutsummaryrefslogtreecommitdiff
path: root/src/insert.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2017-01-09 15:44:25 +0000
committerdrh <drh@noemail.net>2017-01-09 15:44:25 +0000
commite7b554d615072f16896a6879f582c935fa252a12 (patch)
treedff182389564ac6e0415eecf10430d99f9eafca6 /src/insert.c
parentf4e994b23adc5bb62356af81d9fd194796bc22cf (diff)
downloadsqlite-e7b554d615072f16896a6879f582c935fa252a12.tar.gz
sqlite-e7b554d615072f16896a6879f582c935fa252a12.zip
Modify the OP_RowData opcode so that when P3!=0 it is allowed to hold an
ephemeral copy of the content. This avoids unnecessary memcpy() operations in the xfer-optimization and VACUUM. FossilOrigin-Name: 6e106acd74da3baa5c308a76443d2f0a7c904e5e
Diffstat (limited to 'src/insert.c')
-rw-r--r--src/insert.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/insert.c b/src/insert.c
index e55ea2d9f..a33ee1235 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -2138,7 +2138,7 @@ static int xferOptimization(
addr1 = sqlite3VdbeAddOp2(v, OP_Rowid, iSrc, regRowid);
assert( (pDest->tabFlags & TF_Autoincrement)==0 );
}
- sqlite3VdbeAddOp2(v, OP_RowData, iSrc, regData);
+ sqlite3VdbeAddOp3(v, OP_RowData, iSrc, regData, 1);
if( db->flags & SQLITE_Vacuum ){
sqlite3VdbeAddOp3(v, OP_Last, iDest, 0, -1);
insFlags = OPFLAG_NCHANGE|OPFLAG_LASTROWID|
@@ -2170,7 +2170,7 @@ static int xferOptimization(
sqlite3VdbeChangeP5(v, OPFLAG_BULKCSR);
VdbeComment((v, "%s", pDestIdx->zName));
addr1 = sqlite3VdbeAddOp2(v, OP_Rewind, iSrc, 0); VdbeCoverage(v);
- sqlite3VdbeAddOp2(v, OP_RowData, iSrc, regData);
+ sqlite3VdbeAddOp3(v, OP_RowData, iSrc, regData, 1);
if( db->flags & SQLITE_Vacuum ){
/* This INSERT command is part of a VACUUM operation, which guarantees
** that the destination table is empty. If all indexed columns use