1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-16 23:02:26 +03:00

Add asserts as evidence that all FK constraints are either immediate or

deferred.

FossilOrigin-Name: 634ef4fc9f4051245b38f558bb1c733031548c2f
This commit is contained in:
drh
2009-10-12 22:30:49 +00:00
parent 9a616f5607
commit 4c4298392e
5 changed files with 19 additions and 14 deletions

View File

@@ -1178,7 +1178,11 @@ void sqlite3FkDelete(Table *pTab){
fkTriggerDelete(pTab->dbMem, pFKey->apTrigger[1]);
#endif
/* Delete the memory allocated for the FK structure. */
/* EV: R-30323-21917 Each foreign key constraint in SQLite is
** classified as either immediate or deferred.
*/
assert( pFKey->isDeferred==0 || pFKey->isDeferred==1 );
pNext = pFKey->pNextFrom;
sqlite3DbFree(pTab->dbMem, pFKey);
}