Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Apply change 4095 to fts1. Fix snippet generation when the left-most column of an fts table is used in the MATCH clause. Fix for ticket #2429. (CVS 4181) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
c2ba3cc0f7ac9f5dfe5ffb554f9a1cd9 |
User & Date: | shess 2007-07-25 00:25:20.000 |
Context
2007-07-25
| ||
00:28 | Sorry, previous check-in included a last-minute "Did it really work?" change :-). (CVS 4182) (check-in: 5db25e369a user: shess tags: trunk) | |
00:25 | Apply change 4095 to fts1. Fix snippet generation when the left-most column of an fts table is used in the MATCH clause. Fix for ticket #2429. (CVS 4181) (check-in: c2ba3cc0f7 user: shess tags: trunk) | |
2007-07-24
| ||
10:22 | Remove the comment in the documentation that says that incremental vacuum mode is not persistent because as of 3.4.1 it is persistent. Ticket #2528. (CVS 4180) (check-in: 6c4040941e user: drh tags: trunk) | |
Changes
Changes to ext/fts1/fts1.c.
︙ | ︙ | |||
2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 | fulltext_vtab *pFts; if( p->snippet.nMatch ) return; if( p->q.nTerms==0 ) return; pFts = p->q.pFts; nColumn = pFts->nColumn; iColumn = p->iCursorType; if( iColumn<0 || iColumn>=nColumn ){ iFirst = 0; iLast = nColumn-1; }else{ iFirst = iColumn; iLast = iColumn; } | > | 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 | fulltext_vtab *pFts; if( p->snippet.nMatch ) return; if( p->q.nTerms==0 ) return; pFts = p->q.pFts; nColumn = pFts->nColumn; iColumn = p->iCursorType; iColumn = p->iCursorType - QUERY_FULLTEXT; if( iColumn<0 || iColumn>=nColumn ){ iFirst = 0; iLast = nColumn-1; }else{ iFirst = iColumn; iLast = iColumn; } |
︙ | ︙ |
Added test/fts1m.test.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | # 2007 July 27 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #************************************************************************* # This file implements regression tests for SQLite library. The focus # of this script is testing the FTS1 module, specifically snippet # generation. Extracted from fts2o.test. # # $Id: fts1m.test,v 1.1 2007/07/25 00:25:20 shess Exp $ # set testdir [file dirname $argv0] source $testdir/tester.tcl # If SQLITE_ENABLE_FTS1 is not defined, omit this file. ifcapable !fts1 { finish_test return } #--------------------------------------------------------------------- # These tests, fts1m-1.*, test that ticket #2429 is fixed. # db eval { CREATE VIRTUAL TABLE t1 USING fts1(a, b, c); INSERT INTO t1(a, b, c) VALUES('one three four', 'one four', 'one four two'); } do_test fts1m-1.1 { execsql { SELECT rowid, snippet(t1) FROM t1 WHERE c MATCH 'four'; } } {1 {one <b>four</b> two}} do_test fts1m-1.2 { execsql { SELECT rowid, snippet(t1) FROM t1 WHERE b MATCH 'four'; } } {1 {one <b>four</b>}} do_test fts1m-1.3 { execsql { SELECT rowid, snippet(t1) FROM t1 WHERE a MATCH 'four'; } } {1 {one three <b>four</b>}} finish_test |