]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix an assert in btree.c that can be false when using a corrupted database
authordrh <drh@noemail.net>
Fri, 22 May 2015 12:37:37 +0000 (12:37 +0000)
committerdrh <drh@noemail.net>
Fri, 22 May 2015 12:37:37 +0000 (12:37 +0000)
file.

FossilOrigin-Name: a6eb2a39357c35dc13d549ef86c785ff5c69938a

manifest
manifest.uuid
src/btree.c

index d68e6d812a8c9d4cee54f8cb809046b31c3cc138..debf5f12bdc411dbeb14e3abb425d910ff9c6599 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\sthe\s--database\soption\sto\sthe\sfuzzershell\stest\sprogram.
-D 2015-05-22T11:38:22.072
+C Fix\san\sassert\sin\sbtree.c\sthat\scan\sbe\sfalse\swhen\susing\sa\scorrupted\sdatabase\nfile.
+D 2015-05-22T12:37:37.573
 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 30a80340481098d699398cba3536c895373b2e2c
+F src/btree.c dbc8f9207278c109c3f38c9dc5f550c8bb5080d8
 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 6a0cf3ce9e68d0127f9653232e588ed59d34eca5
-R 549a709a6f5e577976c5b6d0eb103940
+P c6d5512f4b8b1237fa4cf5f3f2eae19b160bcf26
+R b9e753c0683555ed773ae3f4504e148b
 U drh
-Z 07941c2a844d4926d98c426b503acb2a
+Z f51f66c2118a09b9970e631fa314a714
index ac2e3ceb4c4d4307411fa7477dd1ba4be508aec6..a98c44dfeb33afb8c807bc78e0da0c3edb2e6901 100644 (file)
@@ -1 +1 @@
-c6d5512f4b8b1237fa4cf5f3f2eae19b160bcf26
\ No newline at end of file
+a6eb2a39357c35dc13d549ef86c785ff5c69938a
\ No newline at end of file
index 4831657fccb5fb3731405131e78f796ce0040270..5e561cbcf456a388529cd1c1d6b8b1ba740eebf9 100644 (file)
@@ -7860,7 +7860,8 @@ static int btreeCreateTable(Btree *p, int *piTable, int createTabFlags){
         pgnoRoot==PENDING_BYTE_PAGE(pBt) ){
       pgnoRoot++;
     }
-    assert( pgnoRoot>=3 );
+    assert( pgnoRoot>=3 || CORRUPT_DB );
+    testcase( pgnoRoot<3 );
 
     /* Allocate a page. The page that currently resides at pgnoRoot will
     ** be moved to the allocated page (unless the allocated page happens