/ Check-in [b9c722bd]
Login

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

Overview
Comment:Fix a bug in icuOpen() in fts2. (CVS 6038)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b9c722bd96b44e0fabd1564ddd982d2aabb7047c
User & Date: danielk1977 2008-12-18 05:30:26
Context
2008-12-18
15:45
Add savepoint2.test, a file containing savepoint tests similar to tests in trans.test and avtrans.test. And a few savepoint bug fixes. (CVS 6039) check-in: 98a53d91 user: danielk1977 tags: trunk
05:30
Fix a bug in icuOpen() in fts2. (CVS 6038) check-in: b9c722bd user: danielk1977 tags: trunk
2008-12-17
19:22
Update the WHERE clause processing infrastructure in preparation for adding multi-index OR evaluation. (CVS 6037) check-in: 78401b33 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts2/fts2_icu.c.

     7      7   **    May you do good and not evil.
     8      8   **    May you find forgiveness for yourself and forgive others.
     9      9   **    May you share freely, never taking more than you give.
    10     10   **
    11     11   *************************************************************************
    12     12   ** This file implements a tokenizer for fts2 based on the ICU library.
    13     13   ** 
    14         -** $Id: fts2_icu.c,v 1.2 2008/07/22 22:20:50 shess Exp $
           14  +** $Id: fts2_icu.c,v 1.3 2008/12/18 05:30:26 danielk1977 Exp $
    15     15   */
    16     16   
    17     17   #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS2)
    18     18   #ifdef SQLITE_ENABLE_ICU
    19     19   
    20     20   #include <assert.h>
    21     21   #include <string.h>
................................................................................
   108    108   
   109    109     UChar32 c;
   110    110     int iInput = 0;
   111    111     int iOut = 0;
   112    112   
   113    113     *ppCursor = 0;
   114    114   
   115         -  if( -1 == nInput ) nInput = strlen(nInput);
          115  +  if( nInput<0 ){
          116  +    nInput = strlen(zInput);
          117  +  }
   116    118     nChar = nInput+1;
   117    119     pCsr = (IcuCursor *)sqlite3_malloc(
   118    120         sizeof(IcuCursor) +                /* IcuCursor */
   119    121         nChar * sizeof(UChar) +            /* IcuCursor.aChar[] */
   120    122         (nChar+1) * sizeof(int)            /* IcuCursor.aOffset[] */
   121    123     );
   122    124     if( !pCsr ){