/ Check-in [e87c883a]
Login

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

Overview
Comment:fts3.c buildTerms() passes -1 for nInput. (CVS 4511)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e87c883a1235ac47ee340a31051dcd5deb369d4e
User & Date: shess 2007-10-24 21:52:37
Context
2007-10-24
23:03
Fix os2GetTempname() to actually work: DosScanEnv() wants an empty PSZ as argument and we obviously don't need to test for file existence any more. (CVS 4512) check-in: 8a233845 user: pweilbacher tags: trunk
21:52
fts3.c buildTerms() passes -1 for nInput. (CVS 4511) check-in: e87c883a user: shess tags: trunk
2007-10-23
18:55
Add comments, assertions, and test cases to demonstrate that the problem described in ticket #2742 is not a real problem. (CVS 4510) check-in: c085d6df user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ext/fts3/fts3_icu.c.

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
108
109
110
111
112
113
114

115
116
117
118
119
120
121
**    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 a tokenizer for fts3 based on the ICU library.
** 
** $Id: fts3_icu.c,v 1.1 2007/08/20 17:37:04 shess Exp $
*/

#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
#ifdef SQLITE_ENABLE_ICU

#include <assert.h>
#include <string.h>
................................................................................

  UChar32 c;
  int iInput = 0;
  int iOut = 0;

  *ppCursor = 0;


  nChar = nInput+1;
  pCsr = (IcuCursor *)sqlite3_malloc(
      sizeof(IcuCursor) +                /* IcuCursor */
      nChar * sizeof(UChar) +            /* IcuCursor.aChar[] */
      (nChar+1) * sizeof(int)            /* IcuCursor.aOffset[] */
  );
  if( !pCsr ){







|







 







>







7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
**    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 a tokenizer for fts3 based on the ICU library.
** 
** $Id: fts3_icu.c,v 1.2 2007/10/24 21:52:37 shess Exp $
*/

#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
#ifdef SQLITE_ENABLE_ICU

#include <assert.h>
#include <string.h>
................................................................................

  UChar32 c;
  int iInput = 0;
  int iOut = 0;

  *ppCursor = 0;

  if( -1 == nInput ) nInput = strlen(nInput);
  nChar = nInput+1;
  pCsr = (IcuCursor *)sqlite3_malloc(
      sizeof(IcuCursor) +                /* IcuCursor */
      nChar * sizeof(UChar) +            /* IcuCursor.aChar[] */
      (nChar+1) * sizeof(int)            /* IcuCursor.aOffset[] */
  );
  if( !pCsr ){