]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix some errors in the guttman versions (disabled by default) of the algorithms in...
authordan <dan@noemail.net>
Mon, 5 Oct 2009 05:40:08 +0000 (05:40 +0000)
committerdan <dan@noemail.net>
Mon, 5 Oct 2009 05:40:08 +0000 (05:40 +0000)
FossilOrigin-Name: 64bad00b4f6fbbc3e5e75966f9c3959ad3d542ef

ext/rtree/rtree.c
manifest
manifest.uuid

index 5a4f570d6af3940dd618a1923fef638509166ec2..f4d74bf0e73027a30ebc47f809ce9d4c191c70ac 100644 (file)
@@ -1486,8 +1486,8 @@ static void LinearPickSeeds(
   ** variables iLeftSeek and iRightSeed.
   */
   for(i=0; i<pRtree->nDim; i++){
-    float x1 = aCell[0].aCoord[i*2];
-    float x2 = aCell[0].aCoord[i*2+1];
+    float x1 = DCOORD(aCell[0].aCoord[i*2]);
+    float x2 = DCOORD(aCell[0].aCoord[i*2+1]);
     float x3 = x1;
     float x4 = x2;
     int jj;
@@ -1496,8 +1496,8 @@ static void LinearPickSeeds(
     int iCellRight = 0;
 
     for(jj=1; jj<nCell; jj++){
-      float left = aCell[jj].aCoord[i*2];
-      float right = aCell[jj].aCoord[i*2+1];
+      float left = DCOORD(aCell[jj].aCoord[i*2]);
+      float right = DCOORD(aCell[jj].aCoord[i*2+1]);
 
       if( left<x1 ) x1 = left;
       if( right>x4 ) x4 = right;
@@ -1855,6 +1855,9 @@ static int splitNodeGuttman(
   int i;
 
   aiUsed = sqlite3_malloc(sizeof(int)*nCell);
+  if( !aiUsed ){
+    return SQLITE_NOMEM;
+  }
   memset(aiUsed, 0, sizeof(int)*nCell);
 
   PickSeeds(pRtree, aCell, nCell, &iLeftSeed, &iRightSeed);
index 769ce8681f10ad451fbb1f450550f30be71030c4..a2a05f64a92245b13bf6bd4573318dfafceeb338 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Handle\san\sSQLITE_IGNORE\sreturned\swhen\srequesting\sauthorization\sto\sread\sparent\skey\scolumns\sby\spretending\sthe\sparent\skey\scolumns\scontain\sNULL\svalues.
-D 2009-10-03T07:04:12
+C Fix\ssome\serrors\sin\sthe\sguttman\sversions\s(disabled\sby\sdefault)\sof\sthe\salgorithms\sin\srtree.c.
+D 2009-10-05T05:40:09
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in 4ca3f1dd6efa2075bcb27f4dc43eef749877740d
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -72,7 +72,7 @@ F ext/icu/README.txt 3b130aa66e7a681136f6add198b076a2f90d1e33
 F ext/icu/icu.c 12e763d288d23b5a49de37caa30737b971a2f1e2
 F ext/icu/sqliteicu.h 728867a802baa5a96de7495e9689a8e01715ef37
 F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761
-F ext/rtree/rtree.c 833ab284f023ce449a1f21b8313f82be7cef1b7e
+F ext/rtree/rtree.c 5275d8f851c366f4a01e8a0c63aa0af492567f28
 F ext/rtree/rtree.h 834dbcb82dc85b2481cde6a07cdadfddc99e9b9e
 F ext/rtree/rtree1.test 207041aba07fdcdd93aa797a745839d305181857
 F ext/rtree/rtree2.test 9ac9d28fa948779df66916c67a5dcf9704c3cb74
@@ -755,7 +755,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P e4fa8be770eb79806d489be46f68f969de17378b
-R 2ef0920c3026f22dce7b0a365b2419f0
+P 3c24df38e6ae5dfe999bbf3133b65df0074c6a50
+R af41d6839c5b3fbd78aaa5433beb2784
 U dan
-Z c958d9e98d78b6ad7096dbaf02193139
+Z b0e13147f28456f325c79b5231df1d66
index db4933029d30695e918ec6b7d6a58a4dc45eafcd..921c08deb8d2f42d7133fd211eff8c8a0dc03968 100644 (file)
@@ -1 +1 @@
-3c24df38e6ae5dfe999bbf3133b65df0074c6a50
\ No newline at end of file
+64bad00b4f6fbbc3e5e75966f9c3959ad3d542ef
\ No newline at end of file