From 401b80656d88cc03b743787239c88b99c097d137 Mon Sep 17 00:00:00 2001 From: shess Date: Tue, 12 Jun 2007 18:20:04 +0000 Subject: [PATCH] Minor comment edits from my prefix development client. No code changes. (CVS 4058) FossilOrigin-Name: 6953cd0935b5526756ab745545420e40adc3c56d --- ext/fts2/fts2.c | 22 ++++++++++++++++++++++ manifest | 14 +++++++------- manifest.uuid | 2 +- 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/ext/fts2/fts2.c b/ext/fts2/fts2.c index 738d30f723..6315151a97 100644 --- a/ext/fts2/fts2.c +++ b/ext/fts2/fts2.c @@ -4254,6 +4254,9 @@ static void interiorReaderDestroy(InteriorReader *pReader){ SCRAMBLE(pReader); } +/* TODO(shess) The assertions are great, but what if we're in NDEBUG +** and the blob is empty or otherwise contains suspect data? +*/ static void interiorReaderInit(const char *pData, int nData, InteriorReader *pReader){ int n, nTerm; @@ -5337,6 +5340,11 @@ static int loadSegmentLeaves(fulltext_vtab *v, ** one more blockid than there are terms (that block contains terms >= ** the last interior-node term). */ +/* TODO(shess) The calling code may already know that the end child is +** not worth calculating, because the end may be in a later sibling +** node. Consider whether breaking symmetry is worthwhile. I suspect +** it's not worthwhile. +*/ static void getChildrenContaining(const char *pData, int nData, const char *pTerm, int nTerm, int isPrefix, sqlite_int64 *piStartChild, @@ -5453,6 +5461,7 @@ static int loadSegmentInt(fulltext_vtab *v, const char *pData, int nData, assert( iStartChild<=iLeavesEnd ); assert( iEndChild<=iLeavesEnd ); + /* Scan through the leaf segments for doclists. */ return loadSegmentLeaves(v, iStartChild, iEndChild, pTerm, nTerm, isPrefix, out); } @@ -5462,6 +5471,19 @@ static int loadSegmentInt(fulltext_vtab *v, const char *pData, int nData, ** merge its doclist over *out (any duplicate doclists read from the ** segment rooted at pData will overwrite those in *out). */ +/* TODO(shess) Consider changing this to determine the depth of the +** leaves using either the first characters of interior nodes (when +** ==1, we're one level above the leaves), or the first character of +** the root (which will describe the height of the tree directly). +** Either feels somewhat tricky to me. +*/ +/* TODO(shess) The current merge is likely to be slow for large +** doclists (though it should process from newest/smallest to +** oldest/largest, so it may not be that bad). It might be useful to +** modify things to allow for N-way merging. This could either be +** within a segment, with pairwise merges across segments, or across +** all segments at once. +*/ static int loadSegment(fulltext_vtab *v, const char *pData, int nData, sqlite_int64 iLeavesEnd, const char *pTerm, int nTerm, int isPrefix, diff --git a/manifest b/manifest index fe5d76310d..20f1d59b6a 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\stypo\sin\sthe\slimits.html\sdocument.\s\sTicket\s#2410.\s(CVS\s4057) -D 2007-06-11T23:23:25 +C Minor\scomment\sedits\sfrom\smy\sprefix\sdevelopment\sclient.\s\sNo\scode\schanges.\s(CVS\s4058) +D 2007-06-12T18:20:05 F Makefile.in 31d9f7cd42c3d73ae117fcdb4b0ecd029fa8f50b F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -36,7 +36,7 @@ F ext/fts1/fulltext.h 08525a47852d1d62a0be81d3fc3fe2d23b094efd F ext/fts1/simple_tokenizer.c 1844d72f7194c3fd3d7e4173053911bf0661b70d F ext/fts1/tokenizer.h 0c53421b832366d20d720d21ea3e1f6e66a36ef9 F ext/fts2/README.txt 8c18f41574404623b76917b9da66fcb0ab38328d -F ext/fts2/fts2.c 4c68ff4f2c95f1cb36d760c89b2a98d07a9dc518 +F ext/fts2/fts2.c b058569b8bebd519b3bb43692240da1fef5246a8 F ext/fts2/fts2.h 591916a822cfb6426518fdbf6069359119bc46eb F ext/fts2/fts2_hash.c b3f22116d4ef0bc8f2da6e3fdc435c86d0951a9b F ext/fts2/fts2_hash.h e283308156018329f042816eb09334df714e105e @@ -503,7 +503,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5 -P abf64d1d0ae3e84c4482b38198eeb44b62cc5d9e -R 817f43007087598b076c7402a721d6d3 -U drh -Z 152cf0111918dabf675eebe4d46a79f2 +P d3fe186c330d74209ac291972b09883b06e0e143 +R 3f86e35e54e70ab08298fee77d1b9c0c +U shess +Z 530393baedc348af152d95395c2180b5 diff --git a/manifest.uuid b/manifest.uuid index 14f416d4e1..7a1d850b36 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -d3fe186c330d74209ac291972b09883b06e0e143 \ No newline at end of file +6953cd0935b5526756ab745545420e40adc3c56d \ No newline at end of file -- 2.47.3