]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Instead of early detection of corruption in balance_nonroot, simply ignore
authordrh <drh@noemail.net>
Sat, 23 May 2015 19:53:48 +0000 (19:53 +0000)
committerdrh <drh@noemail.net>
Sat, 23 May 2015 19:53:48 +0000 (19:53 +0000)
the error, as it is harmless and exceedingly uncommon.

FossilOrigin-Name: 7bbf9b3cd6ebf103ebd8347579aef721d0dcd2dc

manifest
manifest.uuid
src/btree.c

index f0b235a933e5e84f13ee0ccb5a10130294e34999..08f378c86a192f8b21bb126e5c69793f7a3c2633 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Earlier\sdetection\sof\sa\sspecific\skind\sof\scorruption\sin\sthe\sbalance_nonroot()\nroutine.
-D 2015-05-23T19:29:08.948
+C Instead\sof\searly\sdetection\sof\scorruption\sin\sbalance_nonroot,\ssimply\signore\nthe\serror,\sas\sit\sis\sharmless\sand\sexceedingly\suncommon.
+D 2015-05-23T19:53:48.853
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 0a6ae26396ec696221021780dffbb894ff3cead7
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -192,7 +192,7 @@ F src/auth.c b56c78ebe40a2110fd361379f7e8162d23f92240
 F src/backup.c ff743689c4d6c5cb55ad42ed9d174b2b3e71f1e3
 F src/bitvec.c 5eb7958c3bf65210211cbcfc44eff86d0ded7c9d
 F src/btmutex.c 45a968cc85afed9b5e6cf55bf1f42f8d18107f79
-F src/btree.c c40b84835216d0f4c85889b3b86648b375936528
+F src/btree.c 3cf8dde013f2f0cf61535409dd2fd98ed2e7b242
 F src/btree.h 969adc948e89e449220ff0ff724c94bb2a52e9f1
 F src/btreeInt.h 973a22a6fd61350b454ad614832b1f0a5e25a1e4
 F src/build.c d5d9090788118178190c5724c19f93953b8c7a4e
@@ -1278,7 +1278,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P e446d9ce0049b8ce0fd4f03205a0c32776fc76cd
-R adb5597802e2180b564cf04263c0d643
+P ee6dc9913a8733891576e6e298241f7440209c5e
+R 39f78e994c511a1a5474259bce1b573f
 U drh
-Z 0cf4cd65645d8faec0ee2a47a85adb56
+Z 8d523a012edec16ce4cbc40c19e8acd9
index 97a87ce5d40ac263214593bd4ddc4355b190ec18..e89e73b5a644cd333b2a0aef21c95a95a3684681 100644 (file)
@@ -1 +1 @@
-ee6dc9913a8733891576e6e298241f7440209c5e
\ No newline at end of file
+7bbf9b3cd6ebf103ebd8347579aef721d0dcd2dc
\ No newline at end of file
index 6ce6a17635e77b735fa7048b24ef980c7c29214c..4f1ec05b4d5abcbbaa2df452202d920d1d1096d3 100644 (file)
@@ -6879,10 +6879,6 @@ static int balance_nonroot(
       apCell[nCell] = pTemp+leafCorrection;
       assert( leafCorrection==0 || leafCorrection==4 );
       szCell[nCell] = szCell[nCell] - leafCorrection;
-      if( szCell[nCell]<3 ){
-        rc = SQLITE_CORRUPT_BKPT;
-        goto balance_cleanup;
-      }
       if( !pOld->leaf ){
         assert( leafCorrection==0 );
         assert( pOld->hdrOffset==0 );
@@ -6894,8 +6890,8 @@ static int balance_nonroot(
         if( szCell[nCell]<4 ){
           /* Do not allow any cells smaller than 4 bytes. If a smaller cell
           ** does exist, pad it with 0x00 bytes. */
-          assert( szCell[nCell]==3 );
-          assert( apCell[nCell]==&aSpace1[iSpace1-3] );
+          assert( szCell[nCell]==3 || CORRUPT_DB );
+          assert( apCell[nCell]==&aSpace1[iSpace1-3] || CORRUPT_DB );
           aSpace1[iSpace1++] = 0x00;
           szCell[nCell] = 4;
         }