1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

All the secure-delete setting to be changed at run-time using a pragma.

The SQLITE_SECURE_DELETE compile-time option determines the default setting.

FossilOrigin-Name: f72f8a870a0fc98a9f2b564ffafe7946bbce506e
This commit is contained in:
drh
2010-02-12 18:18:39 +00:00
parent 56f2996b48
commit 5b47efa662
7 changed files with 86 additions and 42 deletions

View File

@@ -416,6 +416,25 @@ void sqlite3Pragma(
returnSingleInt(pParse, "max_page_count", newMax);
}else
/*
** PRAGMA [database.]secure_delete
** PRAGMA [database.]secure_delete=ON/OFF
**
** The first form reports the current setting for the
** secure_delete flag. The second form changes the secure_delete
** flag setting and reports thenew value.
*/
if( sqlite3StrICmp(zLeft,"secure_delete")==0 ){
Btree *pBt = pDb->pBt;
int b = -1;
assert( pBt!=0 );
if( zRight ){
b = getBoolean(zRight);
}
b = sqlite3BtreeSecureDelete(pBt, b);
returnSingleInt(pParse, "secure_delete", b);
}else
/*
** PRAGMA [database.]page_count
**