1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Add experimental sqlite3_snapshot_recover() API.

FossilOrigin-Name: 174a6076a8d7bebe5efebf55f3fdc5d87c589cc7
This commit is contained in:
dan
2016-11-18 20:49:43 +00:00
parent edace5d4f1
commit 1158498dce
10 changed files with 221 additions and 15 deletions

View File

@@ -7405,6 +7405,20 @@ int sqlite3PagerSnapshotOpen(Pager *pPager, sqlite3_snapshot *pSnapshot){
}
return rc;
}
/*
** If this is a WAL database, call sqlite3WalSnapshotRecover(). If this
** is not a WAL database, return an error.
*/
int sqlite3PagerSnapshotRecover(Pager *pPager){
int rc;
if( pPager->pWal ){
rc = sqlite3WalSnapshotRecover(pPager->pWal);
}else{
rc = SQLITE_ERROR;
}
return rc;
}
#endif /* SQLITE_ENABLE_SNAPSHOT */
#endif /* !SQLITE_OMIT_WAL */