/ Check-in [0cc0230a]
Login

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

Overview
Comment:Change fts3/4 so that the "unicode61" is included in builds by default. It may now be excluded by defining SQLITE_DISABLE_FTS3_UNICODE.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:0cc0230ae9cfc9760fd8ef2c25e82576b052dbeb
User & Date: dan 2014-07-03 12:18:22
Context
2014-07-07
16:07
Fix a division-by-zero error in the fts3view utility program. Add the fts3view utility program to the "main.mk" makefile. check-in: 64f02699 user: drh tags: trunk
2014-07-03
12:18
Change fts3/4 so that the "unicode61" is included in builds by default. It may now be excluded by defining SQLITE_DISABLE_FTS3_UNICODE. check-in: 0cc0230a user: dan tags: trunk
2014-07-01
15:22
Add another test to verify that SQLite is using stat4 data for composite primary keys on WITHOUT ROWID tables. check-in: 0df1fe72 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts3/fts3.c.

  3746   3746   **
  3747   3747   ** Calling sqlite3Fts3SimpleTokenizerModule() sets the value pointed
  3748   3748   ** to by the argument to point to the "simple" tokenizer implementation.
  3749   3749   ** And so on.
  3750   3750   */
  3751   3751   void sqlite3Fts3SimpleTokenizerModule(sqlite3_tokenizer_module const**ppModule);
  3752   3752   void sqlite3Fts3PorterTokenizerModule(sqlite3_tokenizer_module const**ppModule);
  3753         -#ifdef SQLITE_ENABLE_FTS4_UNICODE61
         3753  +#ifndef SQLITE_DISABLE_FTS3_UNICODE
  3754   3754   void sqlite3Fts3UnicodeTokenizer(sqlite3_tokenizer_module const**ppModule);
  3755   3755   #endif
  3756   3756   #ifdef SQLITE_ENABLE_ICU
  3757   3757   void sqlite3Fts3IcuTokenizerModule(sqlite3_tokenizer_module const**ppModule);
  3758   3758   #endif
  3759   3759   
  3760   3760   /*
................................................................................
  3764   3764   ** function is called by the sqlite3_extension_init() entry point.
  3765   3765   */
  3766   3766   int sqlite3Fts3Init(sqlite3 *db){
  3767   3767     int rc = SQLITE_OK;
  3768   3768     Fts3Hash *pHash = 0;
  3769   3769     const sqlite3_tokenizer_module *pSimple = 0;
  3770   3770     const sqlite3_tokenizer_module *pPorter = 0;
  3771         -#ifdef SQLITE_ENABLE_FTS4_UNICODE61
         3771  +#ifndef SQLITE_DISABLE_FTS3_UNICODE
  3772   3772     const sqlite3_tokenizer_module *pUnicode = 0;
  3773   3773   #endif
  3774   3774   
  3775   3775   #ifdef SQLITE_ENABLE_ICU
  3776   3776     const sqlite3_tokenizer_module *pIcu = 0;
  3777   3777     sqlite3Fts3IcuTokenizerModule(&pIcu);
  3778   3778   #endif
  3779   3779   
  3780         -#ifdef SQLITE_ENABLE_FTS4_UNICODE61
         3780  +#ifndef SQLITE_DISABLE_FTS3_UNICODE
  3781   3781     sqlite3Fts3UnicodeTokenizer(&pUnicode);
  3782   3782   #endif
  3783   3783   
  3784   3784   #ifdef SQLITE_TEST
  3785   3785     rc = sqlite3Fts3InitTerm(db);
  3786   3786     if( rc!=SQLITE_OK ) return rc;
  3787   3787   #endif
................................................................................
  3801   3801     }
  3802   3802   
  3803   3803     /* Load the built-in tokenizers into the hash table */
  3804   3804     if( rc==SQLITE_OK ){
  3805   3805       if( sqlite3Fts3HashInsert(pHash, "simple", 7, (void *)pSimple)
  3806   3806        || sqlite3Fts3HashInsert(pHash, "porter", 7, (void *)pPorter) 
  3807   3807   
  3808         -#ifdef SQLITE_ENABLE_FTS4_UNICODE61
         3808  +#ifndef SQLITE_DISABLE_FTS3_UNICODE
  3809   3809        || sqlite3Fts3HashInsert(pHash, "unicode61", 10, (void *)pUnicode) 
  3810   3810   #endif
  3811   3811   #ifdef SQLITE_ENABLE_ICU
  3812   3812        || (pIcu && sqlite3Fts3HashInsert(pHash, "icu", 4, (void *)pIcu))
  3813   3813   #endif
  3814   3814       ){
  3815   3815         rc = SQLITE_NOMEM;

Changes to ext/fts3/fts3Int.h.

   581    581   int sqlite3Fts3MsrOvfl(Fts3Cursor *, Fts3MultiSegReader *, int *);
   582    582   int sqlite3Fts3MsrIncrRestart(Fts3MultiSegReader *pCsr);
   583    583   
   584    584   /* fts3_tokenize_vtab.c */
   585    585   int sqlite3Fts3InitTok(sqlite3*, Fts3Hash *);
   586    586   
   587    587   /* fts3_unicode2.c (functions generated by parsing unicode text files) */
   588         -#ifdef SQLITE_ENABLE_FTS4_UNICODE61
          588  +#ifndef SQLITE_DISABLE_FTS3_UNICODE
   589    589   int sqlite3FtsUnicodeFold(int, int);
   590    590   int sqlite3FtsUnicodeIsalnum(int);
   591    591   int sqlite3FtsUnicodeIsdiacritic(int);
   592    592   #endif
   593    593   
   594    594   #endif /* !SQLITE_CORE || SQLITE_ENABLE_FTS3 */
   595    595   #endif /* _FTSINT_H */

Changes to ext/fts3/fts3_unicode.c.

     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   ******************************************************************************
    12     12   **
    13     13   ** Implementation of the "unicode" full-text-search tokenizer.
    14     14   */
    15     15   
    16         -#ifdef SQLITE_ENABLE_FTS4_UNICODE61
           16  +#ifndef SQLITE_DISABLE_FTS3_UNICODE
    17     17   
    18     18   #include "fts3Int.h"
    19     19   #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
    20     20   
    21     21   #include <assert.h>
    22     22   #include <stdlib.h>
    23     23   #include <stdio.h>
................................................................................
   386    386       unicodeNext,
   387    387       0,
   388    388     };
   389    389     *ppModule = &module;
   390    390   }
   391    391   
   392    392   #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
   393         -#endif /* ifndef SQLITE_ENABLE_FTS4_UNICODE61 */
          393  +#endif /* ifndef SQLITE_DISABLE_FTS3_UNICODE */

Changes to ext/fts3/fts3_unicode2.c.

    11     11   ******************************************************************************
    12     12   */
    13     13   
    14     14   /*
    15     15   ** DO NOT EDIT THIS MACHINE GENERATED FILE.
    16     16   */
    17     17   
    18         -#if defined(SQLITE_ENABLE_FTS4_UNICODE61)
           18  +#ifndef SQLITE_DISABLE_FTS3_UNICODE
    19     19   #if defined(SQLITE_ENABLE_FTS3) || defined(SQLITE_ENABLE_FTS4)
    20     20   
    21     21   #include <assert.h>
    22     22   
    23     23   /*
    24     24   ** Return true if the argument corresponds to a unicode codepoint
    25     25   ** classified as either a letter or a number. Otherwise false.
................................................................................
   358    358     else if( c>=66560 && c<66600 ){
   359    359       ret = c + 40;
   360    360     }
   361    361   
   362    362     return ret;
   363    363   }
   364    364   #endif /* defined(SQLITE_ENABLE_FTS3) || defined(SQLITE_ENABLE_FTS4) */
   365         -#endif /* !defined(SQLITE_ENABLE_FTS4_UNICODE61) */
          365  +#endif /* !defined(SQLITE_DISABLE_FTS3_UNICODE) */

Changes to src/test_config.c.

   326    326   
   327    327   #ifdef SQLITE_ENABLE_FTS3
   328    328     Tcl_SetVar2(interp, "sqlite_options", "fts3", "1", TCL_GLOBAL_ONLY);
   329    329   #else
   330    330     Tcl_SetVar2(interp, "sqlite_options", "fts3", "0", TCL_GLOBAL_ONLY);
   331    331   #endif
   332    332   
   333         -#if defined(SQLITE_ENABLE_FTS3) && defined(SQLITE_ENABLE_FTS4_UNICODE61)
          333  +#if defined(SQLITE_ENABLE_FTS3) && !defined(SQLITE_DISABLE_FTS3_UNICODE)
   334    334     Tcl_SetVar2(interp, "sqlite_options", "fts3_unicode", "1", TCL_GLOBAL_ONLY);
   335    335   #else
   336    336     Tcl_SetVar2(interp, "sqlite_options", "fts3_unicode", "0", TCL_GLOBAL_ONLY);
   337    337   #endif
   338    338   
   339    339   #ifdef SQLITE_DISABLE_FTS4_DEFERRED
   340    340     Tcl_SetVar2(interp, "sqlite_options", "fts4_deferred", "0", TCL_GLOBAL_ONLY);