mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Correctly handle changing counting when inserting and deleting on
WITHOUT ROWID tables. Add more FOREIGN KEY test cases. FossilOrigin-Name: d072bcd0a8692d590c13c2bf458454c10c12a3e2
This commit is contained in:
@@ -4580,6 +4580,7 @@ case OP_IdxInsert: { /* in2 */
|
||||
pIn2 = &aMem[pOp->p2];
|
||||
assert( pIn2->flags & MEM_Blob );
|
||||
pCrsr = pC->pCursor;
|
||||
if( pOp->p5 & OPFLAG_NCHANGE ) p->nChange++;
|
||||
if( ALWAYS(pCrsr!=0) ){
|
||||
assert( pC->isTable==0 );
|
||||
rc = ExpandBlob(pIn2);
|
||||
@@ -4600,7 +4601,7 @@ case OP_IdxInsert: { /* in2 */
|
||||
break;
|
||||
}
|
||||
|
||||
/* Opcode: IdxDelete P1 P2 P3 * *
|
||||
/* Opcode: IdxDelete P1 P2 P3 * P5
|
||||
** Synopsis: key=r[P2@P3]
|
||||
**
|
||||
** The content of P3 registers starting at register P2 form
|
||||
@@ -4619,6 +4620,7 @@ case OP_IdxDelete: {
|
||||
pC = p->apCsr[pOp->p1];
|
||||
assert( pC!=0 );
|
||||
pCrsr = pC->pCursor;
|
||||
if( pOp->p5 & OPFLAG_NCHANGE ) p->nChange++;
|
||||
if( ALWAYS(pCrsr!=0) ){
|
||||
r.pKeyInfo = pC->pKeyInfo;
|
||||
r.nField = (u16)pOp->p3;
|
||||
|
Reference in New Issue
Block a user