mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-05 15:55:57 +03:00
Updates to the Codec interface to support codecs on attached databases and
to allow rekeying in the middle of a transaction. These changes are only applicable if SQLite is compiled with SQLITE_HAS_CODEC. FossilOrigin-Name: d5b084e9d8cfe9c0c339aca076d472bb50aa764c
This commit is contained in:
37
src/pager.c
37
src/pager.c
@@ -6590,7 +6590,27 @@ void sqlite3PagerSetCodec(
|
||||
void *sqlite3PagerGetCodec(Pager *pPager){
|
||||
return pPager->pCodec;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
** This function is called by the wal module when writing page content
|
||||
** into the log file.
|
||||
**
|
||||
** This function returns a pointer to a buffer containing the encrypted
|
||||
** page content. If a malloc fails, this function may return NULL.
|
||||
*/
|
||||
void *sqlite3PagerCodec(PgHdr *pPg){
|
||||
void *aData = 0;
|
||||
CODEC2(pPg->pPager, pPg->pData, pPg->pgno, 6, return 0, aData);
|
||||
return aData;
|
||||
}
|
||||
|
||||
/*
|
||||
** Return the current pager state
|
||||
*/
|
||||
int sqlite3PagerState(Pager *pPager){
|
||||
return pPager->eState;
|
||||
}
|
||||
#endif /* SQLITE_HAS_CODEC */
|
||||
|
||||
#ifndef SQLITE_OMIT_AUTOVACUUM
|
||||
/*
|
||||
@@ -7145,19 +7165,4 @@ int sqlite3PagerWalFramesize(Pager *pPager){
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SQLITE_HAS_CODEC
|
||||
/*
|
||||
** This function is called by the wal module when writing page content
|
||||
** into the log file.
|
||||
**
|
||||
** This function returns a pointer to a buffer containing the encrypted
|
||||
** page content. If a malloc fails, this function may return NULL.
|
||||
*/
|
||||
void *sqlite3PagerCodec(PgHdr *pPg){
|
||||
void *aData = 0;
|
||||
CODEC2(pPg->pPager, pPg->pData, pPg->pgno, 6, return 0, aData);
|
||||
return aData;
|
||||
}
|
||||
#endif /* SQLITE_HAS_CODEC */
|
||||
|
||||
#endif /* SQLITE_OMIT_DISKIO */
|
||||
|
Reference in New Issue
Block a user