1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-04 04:42:17 +03:00

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
This commit is contained in:
drh
2011-12-23 01:04:17 +00:00
parent bec7c97899
commit cb15f35f3b
13 changed files with 137 additions and 117 deletions

View File

@ -1305,7 +1305,9 @@ int sqlite3WalOpen(
}else{
int iDC = sqlite3OsDeviceCharacteristics(pRet->pWalFd);
if( iDC & SQLITE_IOCAP_SEQUENTIAL ){ pRet->syncHeader = 0; }
if( iDC & SQLITE_IOCAP_ZERO_DAMAGE ){ pRet->padToSectorBoundary = 0; }
if( iDC & SQLITE_IOCAP_POWERSAFE_OVERWRITE ){
pRet->padToSectorBoundary = 0;
}
*ppWal = pRet;
WALTRACE(("WAL%d: opened\n", pRet));
}
@ -2810,9 +2812,9 @@ int sqlite3WalFrames(
** transaction and if PRAGMA synchronous=FULL. If synchronous==NORMAL
** or synchonous==OFF, then no padding or syncing are needed.
**
** If SQLITE_IOCAP_ZERO_DAMAGE is defined, then padding is not needed
** and only the sync is done. If padding is needed, then the final
** frame is repeated (with its commit mark) until the next sector
** If SQLITE_IOCAP_POWERSAFE_OVERWRITE is defined, then padding is not
** needed and only the sync is done. If padding is needed, then the
** final frame is repeated (with its commit mark) until the next sector
** boundary is crossed. Only the part of the WAL prior to the last
** sector boundary is synced; the part of the last frame that extends
** past the sector boundary is written after the sync.