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

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

Issue 1785443004: [sqlite] sql::Recovery working under USE_SYSTEM_SQLITE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment out unused constants. Created 4 years, 9 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/sqlite.gyp ('k') | no next file » | 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 9ad2d1c5c05ad5fc566ab89de94ddbf2a33d4c12..c22fd4d43166e9b428e1ea63dde58d340dae8768 100644
--- a/third_party/sqlite/src/src/recover.c
+++ b/third_party/sqlite/src/src/recover.c
@@ -252,10 +252,10 @@ enum { knHeaderSize = 100};
/* From section 1.5. */
static const unsigned kiPageTypeOffset = 0;
-static const unsigned kiPageFreeBlockOffset = 1;
+/* static const unsigned kiPageFreeBlockOffset = 1; */
static const unsigned kiPageCellCountOffset = 3;
-static const unsigned kiPageCellContentOffset = 5;
-static const unsigned kiPageFragmentedBytesOffset = 7;
+/* static const unsigned kiPageCellContentOffset = 5; */
+/* static const unsigned kiPageFragmentedBytesOffset = 7; */
static const unsigned knPageLeafHeaderBytes = 8;
/* Interior pages contain an additional field. */
static const unsigned kiPageRightChildOffset = 8;
@@ -701,8 +701,6 @@ static int getRootPage(sqlite3 *db, const char *zDb, const char *zTable,
* interiorCursorDestroy - release all resources associated with the
* cursor and any parent cursors.
* interiorCursorCreate - create a cursor with the given parent and page.
- * interiorCursorEOF - returns true if neither the cursor nor the
- * parent cursors can return any more data.
* interiorCursorNextPage - fetch the next child page from the cursor.
*
* Logically, interiorCursorNextPage() returns the next child page
@@ -719,11 +717,6 @@ static int getRootPage(sqlite3 *db, const char *zDb, const char *zTable,
* Note that while interiorCursorNextPage() will refuse to follow
* loops, it does not keep track of pages returned for purposes of
* preventing duplication.
- *
- * Note that interiorCursorEOF() could return false (not at EOF), and
- * interiorCursorNextPage() could still return SQLITE_DONE. This
- * could happen if there are more cells to iterate in an interior
- * page, but those cells refer to invalid pages.
*/
typedef struct RecoverInteriorCursor RecoverInteriorCursor;
struct RecoverInteriorCursor {
@@ -839,14 +832,6 @@ static unsigned interiorCursorChildPage(RecoverInteriorCursor *pCursor){
return 0;
}
-static int interiorCursorEOF(RecoverInteriorCursor *pCursor){
- /* Find a parent with remaining children. EOF if none found. */
- while( pCursor && pCursor->iChild>=pCursor->nChildren ){
- pCursor = pCursor->pParent;
- }
- return pCursor==NULL;
-}
-
/* Internal helper. Used to detect if iPage would cause a loop. */
static int interiorCursorPageInUse(RecoverInteriorCursor *pCursor,
unsigned iPage){
« no previous file with comments | « third_party/sqlite/sqlite.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698