/ Check-in [f9b5b217]
Login

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

Overview
Comment:Cherrypick patch [3126754c72] from the trunk into the content= branch.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fts4-content
Files: files | file ages | folders
SHA1: f9b5b217088a6aeb25eba184ab92d1a842a680a6
User & Date: dan 2011-10-18 12:49:59
Context
2011-10-18
19:39
If a token within an FTS query is prefixed with a '^' character, it must be the first token in a column of data to match. check-in: 63ac33c8 user: dan tags: fts4-content
12:49
Cherrypick patch [3126754c72] from the trunk into the content= branch. check-in: f9b5b217 user: dan tags: fts4-content
2011-10-05
15:11
Change FTS4 so that if both the content=xxx option and column names are specified, the virtual table assumes that the named columns correspond to columns of table xxx. check-in: 289ee431 user: dan tags: fts4-content
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts3/fts3.c.

  4140   4140         ** that will be loaded if all subsequent tokens are deferred.
  4141   4141         */
  4142   4142         Fts3PhraseToken *pToken = pTC->pToken;
  4143   4143         rc = sqlite3Fts3DeferToken(pCsr, pToken, pTC->iCol);
  4144   4144         fts3SegReaderCursorFree(pToken->pSegcsr);
  4145   4145         pToken->pSegcsr = 0;
  4146   4146       }else{
  4147         -      nLoad4 = nLoad4*4;
         4147  +      /* Set nLoad4 to the value of (4^nOther) for the next iteration of the
         4148  +      ** for-loop. Except, limit the value to 2^24 to prevent it from 
         4149  +      ** overflowing the 32-bit integer it is stored in. */
         4150  +      if( ii<12 ) nLoad4 = nLoad4*4;
         4151  +
  4148   4152         if( ii==0 || pTC->pPhrase->nToken>1 ){
  4149   4153           /* Either this is the cheapest token in the entire query, or it is
  4150   4154           ** part of a multi-token phrase. Either way, the entire doclist will
  4151   4155           ** (eventually) be loaded into memory. It may as well be now. */
  4152   4156           Fts3PhraseToken *pToken = pTC->pToken;
  4153   4157           int nList = 0;
  4154   4158           char *pList = 0;

Changes to test/fts3defer.test.

   444    444     );
   445    445     INSERT INTO x1(x1) VALUES('optimize');
   446    446   "
   447    447   
   448    448   do_execsql_test 3.3 {
   449    449     SELECT count(*) FROM x1 WHERE x1 MATCH '"d e f"'
   450    450   } {16}
          451  +
          452  +# At one point the following was causing a floating-point exception.
          453  +#
          454  +do_execsql_test 4.1 {
          455  +  CREATE VIRTUAL TABLE x2 USING FTS4(x);
          456  +  BEGIN;
          457  +  INSERT INTO x2 VALUES('m m m m m m m m m m m m m m m m m m m m m m m m m m');
          458  +  INSERT INTO x2 SELECT * FROM x2;
          459  +  INSERT INTO x2 SELECT * FROM x2;
          460  +  INSERT INTO x2 SELECT * FROM x2;
          461  +  INSERT INTO x2 SELECT * FROM x2;
          462  +  INSERT INTO x2 SELECT * FROM x2;
          463  +  INSERT INTO x2 SELECT * FROM x2;
          464  +  INSERT INTO x2 SELECT * FROM x2;
          465  +  INSERT INTO x2 SELECT * FROM x2;
          466  +  INSERT INTO x2 SELECT * FROM x2;
          467  +  INSERT INTO x2 SELECT * FROM x2;
          468  +  INSERT INTO x2 SELECT * FROM x2;
          469  +  INSERT INTO x2 SELECT * FROM x2;
          470  +  INSERT INTO x2 SELECT * FROM x2;
          471  +  INSERT INTO x2 SELECT * FROM x2;
          472  +  INSERT INTO x2 SELECT * FROM x2;
          473  +  INSERT INTO x2 VALUES('a b c d e f g h i j k l m n o p q r s t u v w x y m');
          474  +  COMMIT;
          475  +}
          476  +do_execsql_test 4.2 {
          477  +  SELECT * FROM x2 WHERE x2 MATCH 'a b c d e f g h i j k l m n o p q r s';
          478  +} {{a b c d e f g h i j k l m n o p q r s t u v w x y m}}
   451    479   
   452    480   
   453    481   finish_test