System.Data.SQLite
Check-in [9166ff7f4f]
Not logged in

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

Overview
Comment:Update core SQLite library to the latest 3.7.13 release candidate.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9166ff7f4fa1e566be6dc403551d32eaab7305fa
User & Date: mistachkin 2012-06-09 00:13:05
Context
2012-06-14
12:27
Update version history docs with the URL for SQLite 3.7.13. check-in: 0e89820825 user: mistachkin tags: trunk
2012-06-12
08:52
Experimental changes to support the prototype sqlite3_close_v2 interface. check-in: 8b0d3259cb user: mistachkin tags: deferred-close
2012-06-09
00:13
Update core SQLite library to the latest 3.7.13 release candidate. check-in: 9166ff7f4f user: mistachkin tags: trunk
2012-06-07
07:44
Fix hyperlink in version docs. check-in: 3d66db6fa8 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to SQLite.Interop/src/core/sqlite3.c.

   662    662   **
   663    663   ** See also: [sqlite3_libversion()],
   664    664   ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
   665    665   ** [sqlite_version()] and [sqlite_source_id()].
   666    666   */
   667    667   #define SQLITE_VERSION        "3.7.13"
   668    668   #define SQLITE_VERSION_NUMBER 3007013
   669         -#define SQLITE_SOURCE_ID      "2012-06-07 07:24:04 506008f000ba4af0b35da023b8c52f7a3f5033bd"
          669  +#define SQLITE_SOURCE_ID      "2012-06-08 14:01:53 025227be5495f950c466dfabac140cba69e498be"
   670    670   
   671    671   /*
   672    672   ** CAPI3REF: Run-Time Library Version Numbers
   673    673   ** KEYWORDS: sqlite3_version, sqlite3_sourceid
   674    674   **
   675    675   ** These interfaces provide the same information as the [SQLITE_VERSION],
   676    676   ** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros
................................................................................
  5011   5011   
  5012   5012   /*
  5013   5013   ** CAPI3REF: Name Of The Folder Holding Database Files
  5014   5014   **
  5015   5015   ** ^(If this global variable is made to point to a string which is
  5016   5016   ** the name of a folder (a.k.a. directory), then all database files
  5017   5017   ** specified with a relative pathname and created or accessed by
  5018         -** SQLite when using a built-in [sqlite3_vfs | VFS] will be assumed
         5018  +** SQLite when using a built-in windows [sqlite3_vfs | VFS] will be assumed
  5019   5019   ** to be relative to that directory.)^ ^If this variable is a NULL
  5020   5020   ** pointer, then SQLite assumes that all database files specified
  5021   5021   ** with a relative pathname are relative to the current directory
  5022         -** for the process.
         5022  +** for the process.  Only the windows VFS makes use of this global
         5023  +** variable; it is ignored by the unix VFS.
  5023   5024   **
  5024   5025   ** Changing the value of this variable while a database connection is
  5025   5026   ** open can result in a corrupt database.
  5026   5027   **
  5027   5028   ** It is not safe to read or modify this variable in more than one
  5028   5029   ** thread at a time.  It is not safe to read or modify this variable
  5029   5030   ** if a [database connection] is being used at the same time in a separate
................................................................................
 70015  70016     u.bl.pC = p->apCsr[pOp->p1];
 70016  70017     assert( u.bl.pC->isSorter==0 );
 70017  70018     assert( u.bl.pC->isTable || pOp->opcode!=OP_RowData );
 70018  70019     assert( u.bl.pC->isIndex || pOp->opcode==OP_RowData );
 70019  70020     assert( u.bl.pC!=0 );
 70020  70021     assert( u.bl.pC->nullRow==0 );
 70021  70022     assert( u.bl.pC->pseudoTableReg==0 );
 70022         -  assert( !u.bl.pC->isSorter );
 70023  70023     assert( u.bl.pC->pCursor!=0 );
 70024  70024     u.bl.pCrsr = u.bl.pC->pCursor;
 70025  70025     assert( sqlite3BtreeCursorIsValid(u.bl.pCrsr) );
 70026  70026   
 70027  70027     /* The OP_RowKey and OP_RowData opcodes always follow OP_NotExists or
 70028  70028     ** OP_Rewind/Op_Next with no intervening instructions that might invalidate
 70029  70029     ** the cursor.  Hence the following sqlite3VdbeCursorMoveto() call is always
................................................................................
115646 115646             zModeType = "cache";
115647 115647           }
115648 115648           if( nOpt==4 && memcmp("mode", zOpt, 4)==0 ){
115649 115649             static struct OpenMode aOpenMode[] = {
115650 115650               { "ro",  SQLITE_OPEN_READONLY },
115651 115651               { "rw",  SQLITE_OPEN_READWRITE }, 
115652 115652               { "rwc", SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE },
115653         -            { "memory",
115654         -                    SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE 
115655         -                       | SQLITE_OPEN_MEMORY },
       115653  +            { "memory", SQLITE_OPEN_MEMORY },
115656 115654               { 0, 0 }
115657 115655             };
115658 115656   
115659 115657             mask = SQLITE_OPEN_READONLY | SQLITE_OPEN_READWRITE
115660 115658                      | SQLITE_OPEN_CREATE | SQLITE_OPEN_MEMORY;
115661 115659             aMode = aOpenMode;
115662 115660             limit = mask & flags;
................................................................................
125934 125932   
125935 125933   /* #include <tcl.h> */
125936 125934   /* #include <string.h> */
125937 125935   
125938 125936   /*
125939 125937   ** Implementation of a special SQL scalar function for testing tokenizers 
125940 125938   ** designed to be used in concert with the Tcl testing framework. This
125941         -** function must be called with two arguments:
       125939  +** function must be called with two or more arguments:
125942 125940   **
125943         -**   SELECT <function-name>(<key-name>, <input-string>);
125944         -**   SELECT <function-name>(<key-name>, <pointer>);
       125941  +**   SELECT <function-name>(<key-name>, ..., <input-string>);
125945 125942   **
125946 125943   ** where <function-name> is the name passed as the second argument
125947 125944   ** to the sqlite3Fts3InitHashTable() function (e.g. 'fts3_tokenizer')
125948 125945   ** concatenated with the string '_test' (e.g. 'fts3_tokenizer_test').
125949 125946   **
125950 125947   ** The return value is a string that may be interpreted as a Tcl
125951 125948   ** list. For each token in the <input-string>, three elements are
................................................................................
125974 125971     const char *zErr = 0;
125975 125972   
125976 125973     const char *zName;
125977 125974     int nName;
125978 125975     const char *zInput;
125979 125976     int nInput;
125980 125977   
125981         -  const char *zArg = 0;
       125978  +  const char *azArg[64];
125982 125979   
125983 125980     const char *zToken;
125984 125981     int nToken;
125985 125982     int iStart;
125986 125983     int iEnd;
125987 125984     int iPos;
       125985  +  int i;
125988 125986   
125989 125987     Tcl_Obj *pRet;
125990 125988   
125991         -  assert( argc==2 || argc==3 );
       125989  +  if( argc<2 ){
       125990  +    sqlite3_result_error(context, "insufficient arguments", -1);
       125991  +    return;
       125992  +  }
125992 125993   
125993 125994     nName = sqlite3_value_bytes(argv[0]);
125994 125995     zName = (const char *)sqlite3_value_text(argv[0]);
125995 125996     nInput = sqlite3_value_bytes(argv[argc-1]);
125996 125997     zInput = (const char *)sqlite3_value_text(argv[argc-1]);
125997 125998   
125998         -  if( argc==3 ){
125999         -    zArg = (const char *)sqlite3_value_text(argv[1]);
126000         -  }
126001         -
126002 125999     pHash = (Fts3Hash *)sqlite3_user_data(context);
126003 126000     p = (sqlite3_tokenizer_module *)sqlite3Fts3HashFind(pHash, zName, nName+1);
126004 126001   
126005 126002     if( !p ){
126006 126003       char *zErr = sqlite3_mprintf("unknown tokenizer: %s", zName);
126007 126004       sqlite3_result_error(context, zErr, -1);
126008 126005       sqlite3_free(zErr);
126009 126006       return;
126010 126007     }
126011 126008   
126012 126009     pRet = Tcl_NewObj();
126013 126010     Tcl_IncrRefCount(pRet);
126014 126011   
126015         -  if( SQLITE_OK!=p->xCreate(zArg ? 1 : 0, &zArg, &pTokenizer) ){
       126012  +  for(i=1; i<argc-1; i++){
       126013  +    azArg[i-1] = (const char *)sqlite3_value_text(argv[i]);
       126014  +  }
       126015  +
       126016  +  if( SQLITE_OK!=p->xCreate(argc-2, azArg, &pTokenizer) ){
126016 126017       zErr = "error in xCreate()";
126017 126018       goto finish;
126018 126019     }
126019 126020     pTokenizer->pModule = p;
126020 126021     if( sqlite3Fts3OpenTokenizer(pTokenizer, 0, zInput, nInput, &pCsr) ){
126021 126022       zErr = "error in xOpen()";
126022 126023       goto finish;
................................................................................
126192 126193       rc = sqlite3_create_function(db, zName, 1, any, p, scalarFunc, 0, 0);
126193 126194     }
126194 126195     if( SQLITE_OK==rc ){
126195 126196       rc = sqlite3_create_function(db, zName, 2, any, p, scalarFunc, 0, 0);
126196 126197     }
126197 126198   #ifdef SQLITE_TEST
126198 126199     if( SQLITE_OK==rc ){
126199         -    rc = sqlite3_create_function(db, zTest, 2, any, p, testFunc, 0, 0);
126200         -  }
126201         -  if( SQLITE_OK==rc ){
126202         -    rc = sqlite3_create_function(db, zTest, 3, any, p, testFunc, 0, 0);
       126200  +    rc = sqlite3_create_function(db, zTest, -1, any, p, testFunc, 0, 0);
126203 126201     }
126204 126202     if( SQLITE_OK==rc ){
126205 126203       rc = sqlite3_create_function(db, zTest2, 0, any, pdb, intTestFunc, 0, 0);
126206 126204     }
126207 126205   #endif
126208 126206   
126209 126207   #ifdef SQLITE_TEST
................................................................................
126586 126584   **
126587 126585   **   fts3SegReaderNext()
126588 126586   **   fts3SegReaderFirstDocid()
126589 126587   **   fts3SegReaderNextDocid()
126590 126588   */
126591 126589   struct Fts3SegReader {
126592 126590     int iIdx;                       /* Index within level, or 0x7FFFFFFF for PT */
126593         -  int bLookup;                    /* True for a lookup only */
       126591  +  u8 bLookup;                     /* True for a lookup only */
       126592  +  u8 rootOnly;                    /* True for a root-only reader */
126594 126593   
126595 126594     sqlite3_int64 iStartBlock;      /* Rowid of first leaf block to traverse */
126596 126595     sqlite3_int64 iLeafEndBlock;    /* Rowid of final leaf block to traverse */
126597 126596     sqlite3_int64 iEndBlock;        /* Rowid of final block in segment (or 0) */
126598 126597     sqlite3_int64 iCurrentBlock;    /* Current leaf block (or 0) */
126599 126598   
126600 126599     char *aNode;                    /* Pointer to node data (or NULL) */
................................................................................
126620 126619     */
126621 126620     char *pOffsetList;
126622 126621     int nOffsetList;                /* For descending pending seg-readers only */
126623 126622     sqlite3_int64 iDocid;
126624 126623   };
126625 126624   
126626 126625   #define fts3SegReaderIsPending(p) ((p)->ppNextElem!=0)
126627         -#define fts3SegReaderIsRootOnly(p) ((p)->aNode==(char *)&(p)[1])
       126626  +#define fts3SegReaderIsRootOnly(p) ((p)->rootOnly!=0)
126628 126627   
126629 126628   /*
126630 126629   ** An instance of this structure is used to create a segment b-tree in the
126631 126630   ** database. The internal details of this type are only accessed by the
126632 126631   ** following functions:
126633 126632   **
126634 126633   **   fts3SegWriterAdd()
................................................................................
128031 128030   
128032 128031     pReader = (Fts3SegReader *)sqlite3_malloc(sizeof(Fts3SegReader) + nExtra);
128033 128032     if( !pReader ){
128034 128033       return SQLITE_NOMEM;
128035 128034     }
128036 128035     memset(pReader, 0, sizeof(Fts3SegReader));
128037 128036     pReader->iIdx = iAge;
128038         -  pReader->bLookup = bLookup;
       128037  +  pReader->bLookup = bLookup!=0;
128039 128038     pReader->iStartBlock = iStartLeaf;
128040 128039     pReader->iLeafEndBlock = iEndLeaf;
128041 128040     pReader->iEndBlock = iEndBlock;
128042 128041   
128043 128042     if( nExtra ){
128044 128043       /* The entire segment is stored in the root node. */
128045 128044       pReader->aNode = (char *)&pReader[1];
       128045  +    pReader->rootOnly = 1;
128046 128046       pReader->nNode = nRoot;
128047 128047       memcpy(pReader->aNode, zRoot, nRoot);
128048 128048       memset(&pReader->aNode[nRoot], 0, FTS3_NODE_PADDING);
128049 128049     }else{
128050 128050       pReader->iCurrentBlock = iStartLeaf-1;
128051 128051     }
128052 128052     *ppReader = pReader;
................................................................................
133436 133436   
133437 133437   typedef struct unicode_tokenizer unicode_tokenizer;
133438 133438   typedef struct unicode_cursor unicode_cursor;
133439 133439   
133440 133440   struct unicode_tokenizer {
133441 133441     sqlite3_tokenizer base;
133442 133442     int bRemoveDiacritic;
       133443  +  int nException;
       133444  +  int *aiException;
133443 133445   };
133444 133446   
133445 133447   struct unicode_cursor {
133446 133448     sqlite3_tokenizer_cursor base;
133447 133449     const unsigned char *aInput;    /* Input text being tokenized */
133448 133450     int nInput;                     /* Size of aInput[] in bytes */
133449 133451     int iOff;                       /* Current offset within aInput[] */
133450 133452     int iToken;                     /* Index of next token to be returned */
133451 133453     char *zToken;                   /* storage for current token */
133452 133454     int nAlloc;                     /* space allocated at zToken */
133453 133455   };
133454 133456   
       133457  +
       133458  +/*
       133459  +** Destroy a tokenizer allocated by unicodeCreate().
       133460  +*/
       133461  +static int unicodeDestroy(sqlite3_tokenizer *pTokenizer){
       133462  +  if( pTokenizer ){
       133463  +    unicode_tokenizer *p = (unicode_tokenizer *)pTokenizer;
       133464  +    sqlite3_free(p->aiException);
       133465  +    sqlite3_free(p);
       133466  +  }
       133467  +  return SQLITE_OK;
       133468  +}
       133469  +
       133470  +/*
       133471  +** As part of a tokenchars= or separators= option, the CREATE VIRTUAL TABLE
       133472  +** statement has specified that the tokenizer for this table shall consider
       133473  +** all characters in string zIn/nIn to be separators (if bAlnum==0) or
       133474  +** token characters (if bAlnum==1).
       133475  +**
       133476  +** For each codepoint in the zIn/nIn string, this function checks if the
       133477  +** sqlite3FtsUnicodeIsalnum() function already returns the desired result.
       133478  +** If so, no action is taken. Otherwise, the codepoint is added to the 
       133479  +** unicode_tokenizer.aiException[] array. For the purposes of tokenization,
       133480  +** the return value of sqlite3FtsUnicodeIsalnum() is inverted for all
       133481  +** codepoints in the aiException[] array.
       133482  +**
       133483  +** If a standalone diacritic mark (one that sqlite3FtsUnicodeIsdiacritic()
       133484  +** identifies as a diacritic) occurs in the zIn/nIn string it is ignored.
       133485  +** It is not possible to change the behaviour of the tokenizer with respect
       133486  +** to these codepoints.
       133487  +*/
       133488  +static int unicodeAddExceptions(
       133489  +  unicode_tokenizer *p,           /* Tokenizer to add exceptions to */
       133490  +  int bAlnum,                     /* Replace Isalnum() return value with this */
       133491  +  const char *zIn,                /* Array of characters to make exceptions */
       133492  +  int nIn                         /* Length of z in bytes */
       133493  +){
       133494  +  const unsigned char *z = (const unsigned char *)zIn;
       133495  +  const unsigned char *zTerm = &z[nIn];
       133496  +  int iCode;
       133497  +  int nEntry = 0;
       133498  +
       133499  +  assert( bAlnum==0 || bAlnum==1 );
       133500  +
       133501  +  while( z<zTerm ){
       133502  +    READ_UTF8(z, zTerm, iCode);
       133503  +    assert( (sqlite3FtsUnicodeIsalnum(iCode) & 0xFFFFFFFE)==0 );
       133504  +    if( sqlite3FtsUnicodeIsalnum(iCode)!=bAlnum 
       133505  +     && sqlite3FtsUnicodeIsdiacritic(iCode)==0 
       133506  +    ){
       133507  +      nEntry++;
       133508  +    }
       133509  +  }
       133510  +
       133511  +  if( nEntry ){
       133512  +    int *aNew;                    /* New aiException[] array */
       133513  +    int nNew;                     /* Number of valid entries in array aNew[] */
       133514  +
       133515  +    aNew = sqlite3_realloc(p->aiException, (p->nException+nEntry)*sizeof(int));
       133516  +    if( aNew==0 ) return SQLITE_NOMEM;
       133517  +    nNew = p->nException;
       133518  +
       133519  +    z = (const unsigned char *)zIn;
       133520  +    while( z<zTerm ){
       133521  +      READ_UTF8(z, zTerm, iCode);
       133522  +      if( sqlite3FtsUnicodeIsalnum(iCode)!=bAlnum 
       133523  +       && sqlite3FtsUnicodeIsdiacritic(iCode)==0
       133524  +      ){
       133525  +        int i, j;
       133526  +        for(i=0; i<nNew && aNew[i]<iCode; i++);
       133527  +        for(j=nNew; j>i; j--) aNew[j] = aNew[j-1];
       133528  +        aNew[i] = iCode;
       133529  +        nNew++;
       133530  +      }
       133531  +    }
       133532  +    p->aiException = aNew;
       133533  +    p->nException = nNew;
       133534  +  }
       133535  +
       133536  +  return SQLITE_OK;
       133537  +}
       133538  +
       133539  +/*
       133540  +** Return true if the p->aiException[] array contains the value iCode.
       133541  +*/
       133542  +static int unicodeIsException(unicode_tokenizer *p, int iCode){
       133543  +  if( p->nException>0 ){
       133544  +    int *a = p->aiException;
       133545  +    int iLo = 0;
       133546  +    int iHi = p->nException-1;
       133547  +
       133548  +    while( iHi>=iLo ){
       133549  +      int iTest = (iHi + iLo) / 2;
       133550  +      if( iCode==a[iTest] ){
       133551  +        return 1;
       133552  +      }else if( iCode>a[iTest] ){
       133553  +        iLo = iTest+1;
       133554  +      }else{
       133555  +        iHi = iTest-1;
       133556  +      }
       133557  +    }
       133558  +  }
       133559  +
       133560  +  return 0;
       133561  +}
       133562  +
       133563  +/*
       133564  +** Return true if, for the purposes of tokenization, codepoint iCode is
       133565  +** considered a token character (not a separator).
       133566  +*/
       133567  +static int unicodeIsAlnum(unicode_tokenizer *p, int iCode){
       133568  +  assert( (sqlite3FtsUnicodeIsalnum(iCode) & 0xFFFFFFFE)==0 );
       133569  +  return sqlite3FtsUnicodeIsalnum(iCode) ^ unicodeIsException(p, iCode);
       133570  +}
       133571  +
133455 133572   /*
133456 133573   ** Create a new tokenizer instance.
133457 133574   */
133458 133575   static int unicodeCreate(
133459 133576     int nArg,                       /* Size of array argv[] */
133460 133577     const char * const *azArg,      /* Tokenizer creation arguments */
133461 133578     sqlite3_tokenizer **pp          /* OUT: New tokenizer handle */
133462 133579   ){
133463 133580     unicode_tokenizer *pNew;        /* New tokenizer object */
133464 133581     int i;
       133582  +  int rc = SQLITE_OK;
       133583  +
133465 133584     pNew = (unicode_tokenizer *) sqlite3_malloc(sizeof(unicode_tokenizer));
133466         -  if( pNew==NULL ){
133467         -    return SQLITE_NOMEM;
133468         -  }
       133585  +  if( pNew==NULL ) return SQLITE_NOMEM;
133469 133586     memset(pNew, 0, sizeof(unicode_tokenizer));
133470 133587     pNew->bRemoveDiacritic = 1;
133471 133588   
133472         -  for(i=0; i<nArg; i++){
       133589  +  for(i=0; rc==SQLITE_OK && i<nArg; i++){
133473 133590       const char *z = azArg[i];
133474 133591       int n = strlen(z);
133475 133592   
133476 133593       if( n==19 && memcmp("remove_diacritics=1", z, 19)==0 ){
133477 133594         pNew->bRemoveDiacritic = 1;
133478 133595       }
133479 133596       else if( n==19 && memcmp("remove_diacritics=0", z, 19)==0 ){
133480 133597         pNew->bRemoveDiacritic = 0;
133481 133598       }
       133599  +    else if( n>=11 && memcmp("tokenchars=", z, 11)==0 ){
       133600  +      rc = unicodeAddExceptions(pNew, 1, &z[11], n-11);
       133601  +    }
       133602  +    else if( n>=11 && memcmp("separators=", z, 11)==0 ){
       133603  +      rc = unicodeAddExceptions(pNew, 0, &z[11], n-11);
       133604  +    }
133482 133605       else{
133483 133606         /* Unrecognized argument */
133484         -      return SQLITE_ERROR;
       133607  +      rc  = SQLITE_ERROR;
133485 133608       }
133486 133609     }
133487 133610   
133488         -  *pp = &pNew->base;
133489         -  return SQLITE_OK;
133490         -}
133491         -
133492         -/*
133493         -** Destroy a tokenizer allocated by unicodeCreate().
133494         -*/
133495         -static int unicodeDestroy(sqlite3_tokenizer *pTokenizer){
133496         -  sqlite3_free(pTokenizer);
133497         -  return SQLITE_OK;
       133611  +  if( rc!=SQLITE_OK ){
       133612  +    unicodeDestroy((sqlite3_tokenizer *)pNew);
       133613  +    pNew = 0;
       133614  +  }
       133615  +  *pp = (sqlite3_tokenizer *)pNew;
       133616  +  return rc;
133498 133617   }
133499 133618   
133500 133619   /*
133501 133620   ** Prepare to begin tokenizing a particular string.  The input
133502 133621   ** string to be tokenized is pInput[0..nBytes-1].  A cursor
133503 133622   ** used to incrementally tokenize this string is returned in 
133504 133623   ** *ppCursor.
................................................................................
133543 133662   }
133544 133663   
133545 133664   /*
133546 133665   ** Extract the next token from a tokenization cursor.  The cursor must
133547 133666   ** have been opened by a prior call to simpleOpen().
133548 133667   */
133549 133668   static int unicodeNext(
133550         -  sqlite3_tokenizer_cursor *p,    /* Cursor returned by simpleOpen */
       133669  +  sqlite3_tokenizer_cursor *pC,   /* Cursor returned by simpleOpen */
133551 133670     const char **paToken,           /* OUT: Token text */
133552 133671     int *pnToken,                   /* OUT: Number of bytes at *paToken */
133553 133672     int *piStart,                   /* OUT: Starting offset of token */
133554 133673     int *piEnd,                     /* OUT: Ending offset of token */
133555 133674     int *piPos                      /* OUT: Position integer of token */
133556 133675   ){
133557         -  unicode_cursor *pCsr = (unicode_cursor *)p;
       133676  +  unicode_cursor *pCsr = (unicode_cursor *)pC;
       133677  +  unicode_tokenizer *p = ((unicode_tokenizer *)pCsr->base.pTokenizer);
133558 133678     int iCode;
133559 133679     char *zOut;
133560 133680     const unsigned char *z = &pCsr->aInput[pCsr->iOff];
133561 133681     const unsigned char *zStart = z;
133562 133682     const unsigned char *zEnd;
133563 133683     const unsigned char *zTerm = &pCsr->aInput[pCsr->nInput];
133564 133684   
133565 133685     /* Scan past any delimiter characters before the start of the next token.
133566 133686     ** Return SQLITE_DONE early if this takes us all the way to the end of 
133567 133687     ** the input.  */
133568 133688     while( z<zTerm ){
133569 133689       READ_UTF8(z, zTerm, iCode);
133570         -    if( sqlite3FtsUnicodeIsalnum(iCode) ) break;
       133690  +    if( unicodeIsAlnum(p, iCode) ) break;
133571 133691       zStart = z;
133572 133692     }
133573 133693     if( zStart>=zTerm ) return SQLITE_DONE;
133574 133694   
133575 133695     zOut = pCsr->zToken;
133576 133696     do {
133577 133697       int iOut;
................................................................................
133583 133703         zOut = &zNew[zOut - pCsr->zToken];
133584 133704         pCsr->zToken = zNew;
133585 133705         pCsr->nAlloc += 64;
133586 133706       }
133587 133707   
133588 133708       /* Write the folded case of the last character read to the output */
133589 133709       zEnd = z;
133590         -    iOut = sqlite3FtsUnicodeFold(iCode, 
133591         -        ((unicode_tokenizer *)pCsr->base.pTokenizer)->bRemoveDiacritic
133592         -    );
       133710  +    iOut = sqlite3FtsUnicodeFold(iCode, p->bRemoveDiacritic);
133593 133711       if( iOut ){
133594 133712         WRITE_UTF8(zOut, iOut);
133595 133713       }
133596 133714   
133597 133715       /* If the cursor is not at EOF, read the next character */
133598 133716       if( z>=zTerm ) break;
133599 133717       READ_UTF8(z, zTerm, iCode);
133600         -  }while( sqlite3FtsUnicodeIsalnum(iCode) 
       133718  +  }while( unicodeIsAlnum(p, iCode) 
133601 133719          || sqlite3FtsUnicodeIsdiacritic(iCode)
133602 133720     );
133603 133721   
133604 133722     /* Set the output variables and return. */
133605 133723     pCsr->iOff = (z - pCsr->aInput);
133606 133724     *paToken = pCsr->zToken;
133607 133725     *pnToken = zOut - pCsr->zToken;

Changes to SQLite.Interop/src/core/sqlite3.h.

   105    105   **
   106    106   ** See also: [sqlite3_libversion()],
   107    107   ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
   108    108   ** [sqlite_version()] and [sqlite_source_id()].
   109    109   */
   110    110   #define SQLITE_VERSION        "3.7.13"
   111    111   #define SQLITE_VERSION_NUMBER 3007013
   112         -#define SQLITE_SOURCE_ID      "2012-06-07 07:24:04 506008f000ba4af0b35da023b8c52f7a3f5033bd"
          112  +#define SQLITE_SOURCE_ID      "2012-06-08 14:01:53 025227be5495f950c466dfabac140cba69e498be"
   113    113   
   114    114   /*
   115    115   ** CAPI3REF: Run-Time Library Version Numbers
   116    116   ** KEYWORDS: sqlite3_version, sqlite3_sourceid
   117    117   **
   118    118   ** These interfaces provide the same information as the [SQLITE_VERSION],
   119    119   ** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros
................................................................................
  4454   4454   
  4455   4455   /*
  4456   4456   ** CAPI3REF: Name Of The Folder Holding Database Files
  4457   4457   **
  4458   4458   ** ^(If this global variable is made to point to a string which is
  4459   4459   ** the name of a folder (a.k.a. directory), then all database files
  4460   4460   ** specified with a relative pathname and created or accessed by
  4461         -** SQLite when using a built-in [sqlite3_vfs | VFS] will be assumed
         4461  +** SQLite when using a built-in windows [sqlite3_vfs | VFS] will be assumed
  4462   4462   ** to be relative to that directory.)^ ^If this variable is a NULL
  4463   4463   ** pointer, then SQLite assumes that all database files specified
  4464   4464   ** with a relative pathname are relative to the current directory
  4465         -** for the process.
         4465  +** for the process.  Only the windows VFS makes use of this global
         4466  +** variable; it is ignored by the unix VFS.
  4466   4467   **
  4467   4468   ** Changing the value of this variable while a database connection is
  4468   4469   ** open can result in a corrupt database.
  4469   4470   **
  4470   4471   ** It is not safe to read or modify this variable in more than one
  4471   4472   ** thread at a time.  It is not safe to read or modify this variable
  4472   4473   ** if a [database connection] is being used at the same time in a separate