From: drh Date: Sat, 23 May 2015 19:53:48 +0000 (+0000) Subject: Instead of early detection of corruption in balance_nonroot, simply ignore X-Git-Tag: version-3.8.11~232 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=82110da9710861a521a64149a46f4367a3a1aa80;p=thirdparty%2Fsqlite.git Instead of early detection of corruption in balance_nonroot, simply ignore the error, as it is harmless and exceedingly uncommon. FossilOrigin-Name: 7bbf9b3cd6ebf103ebd8347579aef721d0dcd2dc --- diff --git a/manifest b/manifest index f0b235a933..08f378c86a 100644 --- 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 diff --git a/manifest.uuid b/manifest.uuid index 97a87ce5d4..e89e73b5a6 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -ee6dc9913a8733891576e6e298241f7440209c5e \ No newline at end of file +7bbf9b3cd6ebf103ebd8347579aef721d0dcd2dc \ No newline at end of file diff --git a/src/btree.c b/src/btree.c index 6ce6a17635..4f1ec05b4d 100644 --- a/src/btree.c +++ b/src/btree.c @@ -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; }