1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +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

@@ -2875,9 +2875,7 @@ static int pager_write_pagelist(PgHdr *pList){
** any such pages to the file.
**
** Also, do not write out any page that has the PGHDR_DONT_WRITE flag
** set (set by sqlite3PagerDontWrite()). Note that if compiled with
** SQLITE_SECURE_DELETE the PGHDR_DONT_WRITE bit is never set and so
** the second test is always true.
** set (set by sqlite3PagerDontWrite()).
*/
if( pgno<=pPager->dbSize && 0==(pList->flags&PGHDR_DONT_WRITE) ){
i64 offset = (pgno-1)*(i64)pPager->pageSize; /* Offset to write */
@@ -4385,7 +4383,6 @@ int sqlite3PagerIswriteable(DbPage *pPg){
}
#endif
#ifndef SQLITE_SECURE_DELETE
/*
** A call to this routine tells the pager that it is not necessary to
** write the information on page pPg back to the disk, even though
@@ -4411,7 +4408,6 @@ void sqlite3PagerDontWrite(PgHdr *pPg){
#endif
}
}
#endif /* !defined(SQLITE_SECURE_DELETE) */
/*
** This routine is called to increment the value of the database file