]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Remove sqlite3_log() and abort() calls added to this branch to debug the
authordan <dan@noemail.net>
Sat, 10 Jun 2017 17:23:20 +0000 (17:23 +0000)
committerdan <dan@noemail.net>
Sat, 10 Jun 2017 17:23:20 +0000 (17:23 +0000)
pointer-map problem ([fda22108]).

FossilOrigin-Name: 79544fc2856f30cac8b0962d00698974e8918562f09769a68264d17e1e1176fe

manifest
manifest.uuid
src/btree.c

index 6d09c0d3081a7b3f9554e48a2ac20a95d4c5cc8c..6d77845a0c00c7a962370279203f12f3ea10efcb 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Update\sthe\srecent\sauto-vacuum\sfix\sso\sthat\sit\sworks\sfor\sthe\sin-memory\npointer-map\sstructure\sused\sby\sthis\sbranch.
-D 2017-06-08T16:23:55.894
+C Remove\ssqlite3_log()\sand\sabort()\scalls\sadded\sto\sthis\sbranch\sto\sdebug\sthe\npointer-map\sproblem\s([fda22108]).
+D 2017-06-10T17:23:20.663
 F Makefile.in 1cc758ce3374a32425e4d130c2fe7b026b20de5b8843243de75f087c0a2661fb
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
 F Makefile.msc 8eeb80162074004e906b53d7340a12a14c471a83743aab975947e95ce061efcc
@@ -350,7 +350,7 @@ F src/auth.c 79f96c6f33bf0e5da8d1c282cee5ebb1852bb8a6ccca3e485d7c459b035d9c3c
 F src/backup.c faf17e60b43233c214aae6a8179d24503a61e83b
 F src/bitvec.c c77b7f5759e413c1c8b53267d633c952e66db79c1171964c7e24c0f92f5019cf
 F src/btmutex.c 0e9ce2d56159b89b9bc8e197e023ee11e39ff8ca
-F src/btree.c 1394abd656dab0f62cfe7060be026451bb7fb75a2c5f5a2ea95484264d105614
+F src/btree.c 5a93ba67ecdcde5e0112c355dffbcb067891c9f2211dbc1e232796e279855de6
 F src/btree.h 14e99cc2b666beb60322173c761d16b668ec2e07c18bbb74e8a49fe85946f8a0
 F src/btreeInt.h 7429915fc8f51bbd78b7ac023aa4afbe5b9660fc1e6970f144b07540a34a4623
 F src/build.c ba3f389668754c407805bbc5f8ab140f063ba6b04a6a86f63006b63b3c7319a8
@@ -1591,7 +1591,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P e2d38d51a9cf1c3dfef742507ec76e3d35853bd09b0d09bf2d404c4b036a184d
-R b03e2900f702f1d9793bda1b10355a73
+P 8e311a6dba202e8733830d8f31b8f0ce11eaefb3a0ab5e5e95ac0d2e5136043b
+R 6be74687e7f9ac02928f68f0a8d639cb
 U dan
-Z f6db321d9b4a7908768625f45dff8451
+Z a53782ebd88a9fbbd1f17403d5393b28
index 1378a871d396d2fffa79f764fb5315f9ef752d74..14de91ea10f2a762c5ff88b5eef44a14121e73cd 100644 (file)
@@ -1 +1 @@
-8e311a6dba202e8733830d8f31b8f0ce11eaefb3a0ab5e5e95ac0d2e5136043b
\ No newline at end of file
+79544fc2856f30cac8b0962d00698974e8918562f09769a68264d17e1e1176fe
\ No newline at end of file
index 75bf0fbdfaab6976f56b9cb06ef5e53bd4e372d1..fadb7eac94b022d4240641066a64f4bfeac07093 100644 (file)
@@ -629,46 +629,11 @@ static void btreePtrmapDelete(BtShared *pBt){
     pBt->pMap = 0;
   }
 }
-
-static void btreeCheckPtrmap(BtShared *p, int nPage, const char *zLog){
-  BtreePtrmap *pMap = p->pMap;
-  if( pMap ){
-    int n = MIN(1 + nPage - (int)pMap->iFirst, 5);
-    int i;
-    for(i=0; i<n; i++){
-      int eType = pMap->aPtr[i].eType;
-      if( (eType==PTRMAP_OVERFLOW1 || 
-            eType==PTRMAP_OVERFLOW2 || 
-            eType==PTRMAP_BTREE) && pMap->aPtr[i].parent==0 
-        ){
-        sqlite3_log(SQLITE_ERROR, 
-            "Bitvec: error at (%s) - (%d/%d %d/%d %d/%d %d/%d %d/%d)",
-            zLog,
-            (int)pMap->aPtr[0].eType, (int)pMap->aPtr[0].parent,
-            (n>1 ? (int)pMap->aPtr[1].eType : -1),
-            (n>1 ? (int)pMap->aPtr[1].parent : -1),
-
-            (n>2 ? (int)pMap->aPtr[2].eType : -1),
-            (n>2 ? (int)pMap->aPtr[2].parent : -1),
-
-            (n>3 ? (int)pMap->aPtr[3].eType : -1),
-            (n>3 ? (int)pMap->aPtr[3].parent : -1),
-
-            (n>4 ? (int)pMap->aPtr[4].eType : -1),
-            (n>4 ? (int)pMap->aPtr[4].parent : -1)
-            );
-        abort();
-        break;
-      }
-    }
-  }
-}
 #else  /* SQLITE_OMIT_CONCURRENT */
 # define btreePtrmapAllocate(x) SQLITE_OK
 # define btreePtrmapDelete(x) 
 # define btreePtrmapBegin(x,y)  SQLITE_OK
 # define btreePtrmapEnd(x,y,z) 
-# define btreeCheckPtrmap(a,b,c)
 #endif /* SQLITE_OMIT_CONCURRENT */
 
 static void releasePage(MemPage *pPage);  /* Forward reference */
@@ -4123,8 +4088,6 @@ static int btreeFixUnlocked(Btree *p){
   Pgno nPage = btreePagecount(pBt);
   u32 nFree = get4byte(&p1[36]);
 
-  btreeCheckPtrmap(pBt, nPage, "btreeFixUnlocked(1)");
-
   assert( pBt->pMap );
   rc = sqlite3PagerUpgradeSnapshot(pPager, pPage1->pDbPage);
   assert( p1==pPage1->aData );
@@ -8717,7 +8680,6 @@ int sqlite3BtreeInsert(
   assert( pCur->apPage[pCur->iPage]->nOverflow==0 );
 
 end_insert:
-  btreeCheckPtrmap(pBt, pBt->nPage, "sqlite3BtreeInsert()");
   return rc;
 }
 
@@ -8813,8 +8775,6 @@ int sqlite3BtreeDelete(BtCursor *pCur, u8 flags){
     invalidateIncrblobCursors(p, pCur->pgnoRoot, pCur->info.nKey, 0);
   }
 
-  btreeCheckPtrmap(pBt, pBt->nPage, "sqlite3BtreeDelete(0)");
-
   /* Make the page containing the entry to be deleted writable. Then free any
   ** overflow pages associated with the entry and finally remove the cell
   ** itself from within the page.  */
@@ -8824,8 +8784,6 @@ int sqlite3BtreeDelete(BtCursor *pCur, u8 flags){
   dropCell(pPage, iCellIdx, info.nSize, &rc);
   if( rc ) return rc;
 
-  btreeCheckPtrmap(pBt, pBt->nPage, "sqlite3BtreeDelete(1)");
-
   /* If the cell deleted was not located on a leaf page, then the cursor
   ** is currently pointing to the largest entry in the sub-tree headed
   ** by the child-page of the cell that was just deleted from an internal
@@ -8851,8 +8809,6 @@ int sqlite3BtreeDelete(BtCursor *pCur, u8 flags){
     if( rc ) return rc;
   }
 
-  btreeCheckPtrmap(pBt, pBt->nPage, "sqlite3BtreeDelete(2)");
-
   /* Balance the tree. If the entry deleted was located on a leaf page,
   ** then the cursor still points to that page. In this case the first
   ** call to balance() repairs the tree, and the if(...) condition is
@@ -8876,8 +8832,6 @@ int sqlite3BtreeDelete(BtCursor *pCur, u8 flags){
     rc = balance(pCur);
   }
 
-  btreeCheckPtrmap(pBt, pBt->nPage, "sqlite3BtreeDelete(3)");
-
   if( rc==SQLITE_OK ){
     if( bSkipnext ){
       assert( bPreserve && (pCur->iPage==iCellDepth || CORRUPT_DB) );