mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Experimental changes toward making snapshots serializable.
FossilOrigin-Name: b6a81fa1fc1fb78a65894129851a4ec3986640de
This commit is contained in:
@@ -3393,9 +3393,14 @@ int sqlite3WalHeapMemory(Wal *pWal){
|
||||
int sqlite3WalSnapshotGet(Wal *pWal, sqlite3_snapshot **ppSnapshot){
|
||||
int rc = SQLITE_OK;
|
||||
WalIndexHdr *pRet;
|
||||
static const u32 aZero[4] = { 0, 0, 0, 0 };
|
||||
|
||||
assert( pWal->readLock>=0 && pWal->writeLock==0 );
|
||||
|
||||
if( memcmp(&pWal->hdr.aFrameCksum[0],aZero,16)==0 ){
|
||||
*ppSnapshot = 0;
|
||||
return SQLITE_ERROR;
|
||||
}
|
||||
pRet = (WalIndexHdr*)sqlite3_malloc(sizeof(WalIndexHdr));
|
||||
if( pRet==0 ){
|
||||
rc = SQLITE_NOMEM_BKPT;
|
||||
|
Reference in New Issue
Block a user