/ Check-in [6953cd09]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Minor comment edits from my prefix development client. No code changes. (CVS 4058)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6953cd0935b5526756ab745545420e40adc3c56d
User & Date: shess 2007-06-12 18:20:05
Context
2007-06-12
18:50
In the "transaction" command of the TCL interface, if a COMMIT fails finish it with a rollback. (CVS 4059) check-in: 6da39fa4 user: drh tags: trunk
18:20
Minor comment edits from my prefix development client. No code changes. (CVS 4058) check-in: 6953cd09 user: shess tags: trunk
2007-06-11
23:23
Fix typo in the limits.html document. Ticket #2410. (CVS 4057) check-in: d3fe186c user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts2/fts2.c.

  4250   4250     sqlite_int64 iBlockid;
  4251   4251   } InteriorReader;
  4252   4252   
  4253   4253   static void interiorReaderDestroy(InteriorReader *pReader){
  4254   4254     SCRAMBLE(pReader);
  4255   4255   }
  4256   4256   
         4257  +/* TODO(shess) The assertions are great, but what if we're in NDEBUG
         4258  +** and the blob is empty or otherwise contains suspect data?
         4259  +*/
  4257   4260   static void interiorReaderInit(const char *pData, int nData,
  4258   4261                                  InteriorReader *pReader){
  4259   4262     int n, nTerm;
  4260   4263   
  4261   4264     /* Require at least the leading flag byte */
  4262   4265     assert( nData>0 );
  4263   4266     assert( pData[0]!='\0' );
................................................................................
  5332   5335   }
  5333   5336   
  5334   5337   /* Taking pData/nData as an interior node, find the sequence of child
  5335   5338   ** nodes which could include pTerm/nTerm/isPrefix.  Note that the
  5336   5339   ** interior node terms logically come between the blocks, so there is
  5337   5340   ** one more blockid than there are terms (that block contains terms >=
  5338   5341   ** the last interior-node term).
         5342  +*/
         5343  +/* TODO(shess) The calling code may already know that the end child is
         5344  +** not worth calculating, because the end may be in a later sibling
         5345  +** node.  Consider whether breaking symmetry is worthwhile.  I suspect
         5346  +** it's not worthwhile.
  5339   5347   */
  5340   5348   static void getChildrenContaining(const char *pData, int nData,
  5341   5349                                     const char *pTerm, int nTerm, int isPrefix,
  5342   5350                                     sqlite_int64 *piStartChild,
  5343   5351                                     sqlite_int64 *piEndChild){
  5344   5352     InteriorReader reader;
  5345   5353   
................................................................................
  5449   5457         assert( iNextStart<=iNextEnd );
  5450   5458         iStartChild = iNextStart;
  5451   5459         iEndChild = iNextEnd;
  5452   5460       }
  5453   5461       assert( iStartChild<=iLeavesEnd );
  5454   5462       assert( iEndChild<=iLeavesEnd );
  5455   5463   
         5464  +    /* Scan through the leaf segments for doclists. */
  5456   5465       return loadSegmentLeaves(v, iStartChild, iEndChild,
  5457   5466                                pTerm, nTerm, isPrefix, out);
  5458   5467     }
  5459   5468   }
  5460   5469   
  5461   5470   /* Call loadSegmentInt() to collect the doclist for pTerm/nTerm, then
  5462   5471   ** merge its doclist over *out (any duplicate doclists read from the
  5463   5472   ** segment rooted at pData will overwrite those in *out).
         5473  +*/
         5474  +/* TODO(shess) Consider changing this to determine the depth of the
         5475  +** leaves using either the first characters of interior nodes (when
         5476  +** ==1, we're one level above the leaves), or the first character of
         5477  +** the root (which will describe the height of the tree directly).
         5478  +** Either feels somewhat tricky to me.
         5479  +*/
         5480  +/* TODO(shess) The current merge is likely to be slow for large
         5481  +** doclists (though it should process from newest/smallest to
         5482  +** oldest/largest, so it may not be that bad).  It might be useful to
         5483  +** modify things to allow for N-way merging.  This could either be
         5484  +** within a segment, with pairwise merges across segments, or across
         5485  +** all segments at once.
  5464   5486   */
  5465   5487   static int loadSegment(fulltext_vtab *v, const char *pData, int nData,
  5466   5488                          sqlite_int64 iLeavesEnd,
  5467   5489                          const char *pTerm, int nTerm, int isPrefix,
  5468   5490                          DataBuffer *out){
  5469   5491     DataBuffer result;
  5470   5492     int rc;