diff options
author | drh <drh@noemail.net> | 2011-12-23 01:04:17 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2011-12-23 01:04:17 +0000 |
commit | cb15f35f3bcfe0ba3635ce1becc41c133838ceba (patch) | |
tree | d72fa318edd042827c34be5109d6463886808add /src/pager.c | |
parent | bec7c97899cc6ff656ea134d2b718909e80c5063 (diff) | |
download | sqlite-cb15f35f3bcfe0ba3635ce1becc41c133838ceba.tar.gz sqlite-cb15f35f3bcfe0ba3635ce1becc41c133838ceba.zip |
Change the name ZERO_DAMAGE to the more descriptive POWERSAFE_OVERWRITE.
The query parameter used to control this device characteristic is now "psow".
FossilOrigin-Name: 6191c5e45175f5c6040e891843b0725a929d6dd7
Diffstat (limited to 'src/pager.c')
-rw-r--r-- | src/pager.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/pager.c b/src/pager.c index f6c8f2fa5..892c245b4 100644 --- a/src/pager.c +++ b/src/pager.c @@ -2516,20 +2516,21 @@ static int pager_truncate(Pager *pPager, Pgno nPage){ ** it is less than 32, or rounded down to MAX_SECTOR_SIZE if it ** is greater than MAX_SECTOR_SIZE. ** -** If the file has the SQLITE_IOCAP_ZERO_DAMAGE property, then set the -** effective sector size to its minimum value (512). The purpose of +** If the file has the SQLITE_IOCAP_POWERSAFE_OVERWRITE property, then set +** the effective sector size to its minimum value (512). The purpose of ** pPager->sectorSize is to define the "blast radius" of bytes that ** might change if a crash occurs while writing to a single byte in -** that range. But with ZERO_DAMAGE, the blast radius is zero, so -** we minimize the sector size. For backwards compatibility of the -** rollback journal file format, we cannot reduce the effective sector -** size below 512. +** that range. But with POWERSAFE_OVERWRITE, the blast radius is zero +** (that is what POWERSAFE_OVERWRITE means), so we minimize the sector +** size. For backwards compatibility of the rollback journal file format, +** we cannot reduce the effective sector size below 512. */ static void setSectorSize(Pager *pPager){ assert( isOpen(pPager->fd) || pPager->tempFile ); if( pPager->tempFile - || (sqlite3OsDeviceCharacteristics(pPager->fd)&SQLITE_IOCAP_ZERO_DAMAGE)!=0 + || (sqlite3OsDeviceCharacteristics(pPager->fd) & + SQLITE_IOCAP_POWERSAFE_OVERWRITE)!=0 ){ /* Sector size doesn't matter for temporary files. Also, the file ** may not have been opened yet, in which case the OsSectorSize() |