1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-11 01:42:22 +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:
drh
2013-11-04 15:23:25 +00:00
parent 90e758ff1f
commit 6546af1480
6 changed files with 106 additions and 13 deletions

View File

@@ -393,6 +393,9 @@ void sqlite3DeleteFrom(
sqlite3VdbeAddOp4(v, OP_MakeRecord, iPk, nPk, iKey,
sqlite3IndexAffinityStr(v, pPk), P4_TRANSIENT);
sqlite3VdbeAddOp2(v, OP_IdxInsert, iEph, iKey);
if( db->flags & SQLITE_CountRows ){
sqlite3VdbeAddOp2(v, OP_AddImm, memCnt, 1);
}
sqlite3WhereEnd(pWInfo);
/* Open cursors for all indices of the table.