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:
14
src/pager.c
14
src/pager.c
@@ -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 */
|
||||
|
||||
|
Reference in New Issue
Block a user