]> git.ipfire.org Git - thirdparty/sqlite.git/commit
Don't store empty segments. When inserting empty strings, the code
authorshess <shess@noemail.net>
Wed, 25 Oct 2006 05:21:55 +0000 (05:21 +0000)
committershess <shess@noemail.net>
Wed, 25 Oct 2006 05:21:55 +0000 (05:21 +0000)
commit9289cba07648d1bb4fa40649c01208c98430a382
treece32c8e2c327b08655aec42e3cd307b57921bfba
parent8e734e35183a2b46efc33d42741ea51e2e73b7bf
Don't store empty segments.  When inserting empty strings, the code
was writing out a segment made up of a single leaf node containing the
\0 header.  LeafReader assumed that leaf nodes always contained at
least one term, so assertions would fail.

While it would be possible to support reading and merging empty
segments, there's no reason to do so.  While this change could have
been done in writeZeroSegment(), I put it in leafWriterFlush() so that
it would work right if segmentMerge() created an empty segment, which
could happen with future changes to how deleted documents are handled. (CVS 3484)

FossilOrigin-Name: fed79beec7da24a26ae94494bdc0c98dd102bc06
ext/fts2/fts2.c
manifest
manifest.uuid