1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Add SQLITE_TESTCTRL_FK_NO_ACTION.

FossilOrigin-Name: 563cf5f782cdddbbd7f727c65118edfd109aeb731c8aaf0d6ee5ee7030e61ea9
This commit is contained in:
drh
2023-10-21 12:54:37 +00:00
parent a35a54b824
commit 51b358e5e5
5 changed files with 33 additions and 9 deletions

View File

@@ -4170,6 +4170,24 @@ int sqlite3_test_control(int op, ...){
}
#endif
/* sqlite3_test_control(SQLITE_TESTCTRL_FK_NO_ACTION, sqlite3 *db, int b);
**
** If b is true, then activate the SQLITE_FkNoAction setting. If b is
** false then clearn that setting. If the SQLITE_FkNoAction setting is
** abled, all foreign key ON DELETE and ON UPDATE actions behave as if
** they were NO ACTION, regardless of how they are defined.
*/
case SQLITE_TESTCTRL_FK_NO_ACTION: {
sqlite3 *db = va_arg(ap, sqlite3*);
int b = va_arg(ap, int);
if( b ){
db->flags |= SQLITE_FkNoAction;
}else{
db->flags &= ~SQLITE_FkNoAction;
}
break;
}
/*
** sqlite3_test_control(BITVEC_TEST, size, program)
**