1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Remove unused variable from the ChooseLeaf algorithm in r-tree.

FossilOrigin-Name: fb2e4a8067edc29ba64973820f265b21dfee0d32f4d675d32100d5eef93c2830
This commit is contained in:
drh
2023-09-13 11:36:44 +00:00
parent fef1c11f92
commit f4ae37ca44
3 changed files with 10 additions and 13 deletions

View File

@ -200,7 +200,7 @@ struct Rtree {
/* Statement for writing to the "aux:" fields, if there are any */ /* Statement for writing to the "aux:" fields, if there are any */
sqlite3_stmt *pWriteAux; sqlite3_stmt *pWriteAux;
RtreeNode *aHash[HASHSIZE]; /* Hash table of in-memory nodes. */ RtreeNode *aHash[HASHSIZE]; /* Hash table of in-memory nodes. */
}; };
/* Possible values for Rtree.eCoordType: */ /* Possible values for Rtree.eCoordType: */
@ -2241,8 +2241,6 @@ static int ChooseLeaf(
RtreeCell cell; RtreeCell cell;
RtreeNode *pChild = 0; RtreeNode *pChild = 0;
RtreeCell *aCell = 0;
/* Select the child node which will be enlarged the least if pCell /* Select the child node which will be enlarged the least if pCell
** is inserted into it. Resolve ties by choosing the entry with ** is inserted into it. Resolve ties by choosing the entry with
** the smallest area. ** the smallest area.
@ -2264,7 +2262,6 @@ static int ChooseLeaf(
} }
} }
sqlite3_free(aCell);
rc = nodeAcquire(pRtree, iBest, pNode, &pChild); rc = nodeAcquire(pRtree, iBest, pNode, &pChild);
nodeRelease(pRtree, pNode); nodeRelease(pRtree, pNode);
pNode = pChild; pNode = pChild;
@ -3013,7 +3010,7 @@ static int rtreeInsertCell(
} }
} }
if( nodeInsertCell(pRtree, pNode, pCell) ){ if( nodeInsertCell(pRtree, pNode, pCell) ){
if( iHeight<=pRtree->iReinsertHeight || pNode->iNode==1){ if( iHeight<=pRtree->iReinsertHeight || pNode->iNode==1 ){
rc = SplitNode(pRtree, pNode, pCell, iHeight); rc = SplitNode(pRtree, pNode, pCell, iHeight);
}else{ }else{
pRtree->iReinsertHeight = iHeight; pRtree->iReinsertHeight = iHeight;

View File

@ -1,5 +1,5 @@
C Replace\san\sif()\scondition\sin\sfts5\sthat\sis\salways\strue\swith\san\sassert(). C Remove\sunused\svariable\sfrom\sthe\sChooseLeaf\salgorithm\sin\sr-tree.
D 2023-09-13T11:24:58.386 D 2023-09-13T11:36:44.782
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -471,7 +471,7 @@ F ext/repair/test/checkindex01.test b530f141413b587c9eb78ff734de6bb79bc3515c3350
F ext/repair/test/test.tcl 686d76d888dffd021f64260abf29a55c57b2cedfa7fc69150b42b1d6119aac3c F ext/repair/test/test.tcl 686d76d888dffd021f64260abf29a55c57b2cedfa7fc69150b42b1d6119aac3c
F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761 F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761
F ext/rtree/geopoly.c 971e0b5bd9adaf0811feb8c0842a310811159da10319eb0e74fdb42bf26b99ca F ext/rtree/geopoly.c 971e0b5bd9adaf0811feb8c0842a310811159da10319eb0e74fdb42bf26b99ca
F ext/rtree/rtree.c 2da7e570a4782c6e9a306d7d1cebdfc3c3a1b690725ce90fdbe09650b86db79c F ext/rtree/rtree.c e1410f3878d6c08c423dbe5f22dd8c63e80209548efe0a2b9480385349bff884
F ext/rtree/rtree.h 4a690463901cb5e6127cf05eb8e642f127012fd5003830dbc974eca5802d9412 F ext/rtree/rtree.h 4a690463901cb5e6127cf05eb8e642f127012fd5003830dbc974eca5802d9412
F ext/rtree/rtree1.test 877d40b8b61b1f88cec9d4dc0ff8334f5b05299fac12a35141532e2881860e9d F ext/rtree/rtree1.test 877d40b8b61b1f88cec9d4dc0ff8334f5b05299fac12a35141532e2881860e9d
F ext/rtree/rtree2.test 9d9deddbb16fd0c30c36e6b4fdc3ee3132d765567f0f9432ee71e1303d32603d F ext/rtree/rtree2.test 9d9deddbb16fd0c30c36e6b4fdc3ee3132d765567f0f9432ee71e1303d32603d
@ -2119,8 +2119,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P 6f7842f577a28df1f809cd4bae9e8eafa26f2b54a25a1362ebbdebf5026be57c P 2170312c8d7f076cbb8319227de3fac981432dae186bc1928cd217e41119b580
R f3b4c841c08d4c6a9c1041284895fe73 R 5a9318b9cac2f3018c96507d7d060a53
U dan U drh
Z 604f49d2d8fa4165afb87849a7893996 Z 6f6864bbd34f25ad7f3ca334cafaebb1
# Remove this line to create a well-formed Fossil manifest. # Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
2170312c8d7f076cbb8319227de3fac981432dae186bc1928cd217e41119b580 fb2e4a8067edc29ba64973820f265b21dfee0d32f4d675d32100d5eef93c2830