]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
The R-tree module should not assume that its shadow tables are consistent.
authordrh <drh@noemail.net>
Tue, 24 Aug 2010 01:49:47 +0000 (01:49 +0000)
committerdrh <drh@noemail.net>
Tue, 24 Aug 2010 01:49:47 +0000 (01:49 +0000)
If a problem is found in a shadow table, return SQLITE_CORRUPT.

FossilOrigin-Name: 7f2f71cc9e3c39093f09231f448576cff6afb5fe

ext/rtree/rtree.c
manifest
manifest.uuid

index 0bc4dd7e1cb806f8c46b8e25333bf2a205e14727..a0b45bbc788f236fb9df3782658d8316aba16b90 100644 (file)
@@ -438,8 +438,11 @@ nodeAcquire(
     pRtree->iDepth = readInt16(pNode->zData);
   }
 
-  assert( (rc==SQLITE_OK && pNode) || (pNode==0 && rc!=SQLITE_OK) );
-  nodeHashInsert(pRtree, pNode);
+  if( pNode!=0 ){
+    nodeHashInsert(pRtree, pNode);
+  }else if( rc==SQLITE_OK ){
+    rc = SQLITE_CORRUPT;
+  }
 
   return rc;
 }
index 9fe69e1daae10a39e9e4f3233317ae71646730e8..56f3ca2800486b000e58388465de4b7f1f2878e1 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,8 +1,8 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-C Version\s3.7.2\srelease\scandidate\s1
-D 2010-08-23T18:52:01
+C The\sR-tree\smodule\sshould\snot\sassume\sthat\sits\sshadow\stables\sare\sconsistent.\nIf\sa\sproblem\sis\sfound\sin\sa\sshadow\stable,\sreturn\sSQLITE_CORRUPT.
+D 2010-08-24T01:49:48
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 543f91f24cd7fee774ecc0a61c19704c0c3e78fd
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -81,7 +81,7 @@ F ext/icu/README.txt bf8461d8cdc6b8f514c080e4e10dc3b2bbdfefa9
 F ext/icu/icu.c 850e9a36567bbcce6bd85a4b68243cad8e3c2de2
 F ext/icu/sqliteicu.h 728867a802baa5a96de7495e9689a8e01715ef37
 F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761
-F ext/rtree/rtree.c f2fbb6470155316027a8b888e8623bc1819fe443
+F ext/rtree/rtree.c 1a39ad566196d2342f4a5ef337e165b7a016e6cd
 F ext/rtree/rtree.h 834dbcb82dc85b2481cde6a07cdadfddc99e9b9e
 F ext/rtree/rtree1.test 51bb0cd0405970501e63258401ae5ad235a4f468
 F ext/rtree/rtree2.test 7b665c44d25e51b3098068d983a39902b2e2d7a1
@@ -849,14 +849,14 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 21a1e5961bba148fda50cc0b7d472ca74f90808a
-R aa9cc30f9dbcb7ea427137065cf4e4be
+P 42537b60566f288167f1b5864a5435986838e3a3
+R 2c180f83601b5fb3eca266f1d7990e7f
 U drh
-Z e73ee740c6593b4458c2d23b6fa7b923
+Z 10d60dee314996598be1db5d0c7786c6
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.6 (GNU/Linux)
 
-iD8DBQFMcsNUoxKgR168RlERApyRAKCOHvk0Gn1uE2F8YVm3k/w13/3UugCeOh16
-bApiXjM1a7FP+Qr1HX5kWTQ=
-=L2Lf
+iD8DBQFMcyU/oxKgR168RlERAix8AJ4mlLsRwIdCGZXuMMz9jxnrImU9JACffIYe
+yL2XIDq+iw10tkqZ3HaRjys=
+=n6uZ
 -----END PGP SIGNATURE-----
index 7f0f695ba62651f7e05da0923df9e7a3a6b6e2a6..589a50ffd975a10027512a73cc243bde1034fee0 100644 (file)
@@ -1 +1 @@
-42537b60566f288167f1b5864a5435986838e3a3
\ No newline at end of file
+7f2f71cc9e3c39093f09231f448576cff6afb5fe
\ No newline at end of file