Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: third_party/sqlite/src/src/recover.c

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/src/random.c ('k') | third_party/sqlite/src/src/resolve.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/src/recover.c
diff --git a/third_party/sqlite/src/src/recover.c b/third_party/sqlite/src/src/recover.c
index 6882d6f3574264d27264fa56e948cbafcc56cd45..8e3929d453be4db35ebe8468185e54905485f667 100644
--- a/third_party/sqlite/src/src/recover.c
+++ b/third_party/sqlite/src/src/recover.c
@@ -219,7 +219,8 @@
* DbPage.pData, .pPager, and .pgno
* sqlite3 struct.
* sqlite3BtreePager() and sqlite3BtreeGetPageSize()
- * sqlite3PagerAcquire() and sqlite3PagerUnref()
+ * sqlite3BtreeGetOptimalReserve()
+ * sqlite3PagerGet() and sqlite3PagerUnref()
* getVarint().
*/
#include "sqliteInt.h"
@@ -405,7 +406,8 @@ static int GetPager(sqlite3 *db, const char *zName,
}
*pPager = sqlite3BtreePager(pBt);
- *pnPageSize = sqlite3BtreeGetPageSize(pBt) - sqlite3BtreeGetReserve(pBt);
+ *pnPageSize =
+ sqlite3BtreeGetPageSize(pBt) - sqlite3BtreeGetOptimalReserve(pBt);
return SQLITE_OK;
}
@@ -777,7 +779,7 @@ static int interiorCursorNextPage(RecoverInteriorCursor **ppCursor,
if( interiorCursorPageInUse(pCursor, iPage) ){
fprintf(stderr, "Loop detected at %d\n", iPage);
}else{
- int rc = sqlite3PagerAcquire(pCursor->pPage->pPager, iPage, ppPage, 0);
+ int rc = sqlite3PagerGet(pCursor->pPage->pPager, iPage, ppPage, 0);
if( rc==SQLITE_OK ){
return SQLITE_ROW;
}
@@ -921,7 +923,7 @@ static int overflowMaybeCreate(DbPage *pPage, unsigned nPageSize,
while( iNextPage && nBytes<nRecordBytes ){
RecoverOverflow *pOverflow; /* New overflow page for the list. */
- rc = sqlite3PagerAcquire(pPage->pPager, iNextPage, &pPage, 0);
+ rc = sqlite3PagerGet(pPage->pPager, iNextPage, &pPage, 0);
if( rc!=SQLITE_OK ){
break;
}
@@ -1250,7 +1252,7 @@ static int leafCursorCreate(Pager *pPager, unsigned nPageSize,
int rc;
/* Start out with the root page. */
- rc = sqlite3PagerAcquire(pPager, iRootPage, &pPage, 0);
+ rc = sqlite3PagerGet(pPager, iRootPage, &pPage, 0);
if( rc!=SQLITE_OK ){
return rc;
}
« no previous file with comments | « third_party/sqlite/src/src/random.c ('k') | third_party/sqlite/src/src/resolve.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698