1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

Remove the undocumented sqlite3_foreign_key_check() API and replace it with

sqlite3_db_status(db, SQLITE_DBSTATUS_DEFERRED_FKS, ...).  Add test cases
for the new functionality.

FossilOrigin-Name: d39e65fe702a2e11477f2d996f77404f45763368
This commit is contained in:
drh
2013-07-11 13:49:59 +00:00
parent 963c74df59
commit 07001c45a1
9 changed files with 142 additions and 20 deletions

View File

@ -2971,8 +2971,9 @@ int sqlite3changeset_apply(
}
if( rc==SQLITE_OK ){
int nFk = sqlite3_foreign_key_check(db);
if( nFk>0 ){
int nFk, notUsed;
sqlite3_db_status(db, SQLITE_DBSTATUS_DEFERRED_FKS, &nFk, &notUsed, 0);
if( nFk!=0 ){
int res = SQLITE_CHANGESET_ABORT;
if( xConflict ){
sqlite3_changeset_iter sIter;