aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2020-12-29 15:06:26 +0000
committerdrh <drh@noemail.net>2020-12-29 15:06:26 +0000
commita06eafc8fc70b8d6eaef429e75f603518aba7948 (patch)
tree9bb9cab5fd9b656fa3ce40308cf8fe64de6b3314 /src
parent277a30d9ce5ea64a36b2b970c3e39c275e6999b8 (diff)
downloadsqlite-a06eafc8fc70b8d6eaef429e75f603518aba7948.tar.gz
sqlite-a06eafc8fc70b8d6eaef429e75f603518aba7948.zip
Do not set the P3 parameter on OP_RowCell when copying an index btree, as
P3 is not used in that case. FossilOrigin-Name: eef070a4aadf02a845d0ed00767be049d3b76e811e24797a116776fa836d1b03
Diffstat (limited to 'src')
-rw-r--r--src/insert.c2
-rw-r--r--src/vdbe.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/insert.c b/src/insert.c
index bc8a7f5b2..0e52ee7a0 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -2991,7 +2991,7 @@ static int xferOptimization(
if( i==pSrcIdx->nColumn ){
idxInsFlags = OPFLAG_USESEEKRESULT|OPFLAG_PREFORMAT;
sqlite3VdbeAddOp1(v, OP_SeekEnd, iDest);
- sqlite3VdbeAddOp3(v, OP_RowCell, iDest, iSrc, regData);
+ sqlite3VdbeAddOp2(v, OP_RowCell, iDest, iSrc);
}
}else if( !HasRowid(pSrc) && pDestIdx->idxType==SQLITE_IDXTYPE_PRIMARYKEY ){
idxInsFlags |= OPFLAG_NCHANGE;
diff --git a/src/vdbe.c b/src/vdbe.c
index 904b5e2bc..8e107a8a5 100644
--- a/src/vdbe.c
+++ b/src/vdbe.c
@@ -5160,6 +5160,8 @@ case OP_RowCell: {
VdbeCursor *pSrc; /* Cursor to read from */
i64 iKey; /* Rowid value to insert with */
assert( pOp[1].opcode==OP_Insert || pOp[1].opcode==OP_IdxInsert );
+ assert( pOp[1].opcode==OP_Insert || pOp->p3==0 );
+ assert( pOp[1].opcode==OP_IdxInsert || pOp->p3>0 );
assert( pOp[1].p5 & OPFLAG_PREFORMAT );
pDest = p->apCsr[pOp->p1];
pSrc = p->apCsr[pOp->p2];