/ Check-in [a0b43a32]
Login

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

Overview
Comment:Changes to #ifdefs so that the build goes correctly if the only FTS macro defined is SQLITE_ENABLE_FTS4.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a0b43a320e6491de7070966ed7c3ec55fd660a85
User & Date: drh 2011-06-16 00:54:45
Context
2011-06-16
16:06
Fix a problem with NEAR queries executed inside a transaction that writes the FTS table. check-in: 051c756c user: dan tags: trunk
00:54
Changes to #ifdefs so that the build goes correctly if the only FTS macro defined is SQLITE_ENABLE_FTS4. check-in: a0b43a32 user: drh tags: trunk
2011-06-15
23:34
Fix the multiplex.test module so that it works with the inmemory_journal permutation. check-in: 03d9480f user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/fts3/fts3.c.

   288    288   ** older data.
   289    289   **
   290    290   ** TODO(shess) Provide a VACUUM type operation to clear out all
   291    291   ** deletions and duplications.  This would basically be a forced merge
   292    292   ** into a single segment.
   293    293   */
   294    294   
          295  +#include "fts3Int.h"
   295    296   #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
   296    297   
   297    298   #if defined(SQLITE_ENABLE_FTS3) && !defined(SQLITE_CORE)
   298    299   # define SQLITE_CORE 1
   299    300   #endif
   300    301   
   301         -#include "fts3Int.h"
   302         -
   303    302   #include <assert.h>
   304    303   #include <stdlib.h>
   305    304   #include <stddef.h>
   306    305   #include <stdio.h>
   307    306   #include <string.h>
   308    307   #include <stdarg.h>
   309    308   

Changes to ext/fts3/fts3Int.h.

     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   **
    13     13   */
    14         -
    15     14   #ifndef _FTSINT_H
    16     15   #define _FTSINT_H
    17     16   
    18     17   #if !defined(NDEBUG) && !defined(SQLITE_DEBUG) 
    19     18   # define NDEBUG 1
    20     19   #endif
    21     20   
           21  +/*
           22  +** FTS4 is really an extension for FTS3.  It is enabled using the
           23  +** SQLITE_ENABLE_FTS3 macro.  But to avoid confusion we also all
           24  +** the SQLITE_ENABLE_FTS4 macro to serve as an alisse for SQLITE_ENABLE_FTS3.
           25  +*/
           26  +#if defined(SQLITE_ENABLE_FTS4) && !defined(SQLITE_ENABLE_FTS3)
           27  +# define SQLITE_ENABLE_FTS3
           28  +#endif
           29  +
           30  +#ifdef SQLITE_ENABLE_FTS3
    22     31   #include "sqlite3.h"
    23     32   #include "fts3_tokenizer.h"
    24     33   #include "fts3_hash.h"
    25     34   
    26     35   /*
    27     36   ** This constant controls how often segments are merged. Once there are
    28     37   ** FTS3_MERGE_COUNT segments of level N, they are merged into a single
................................................................................
   498    507   int sqlite3Fts3MsrIncrNext(
   499    508       Fts3Table *, Fts3MultiSegReader *, sqlite3_int64 *, char **, int *);
   500    509   char *sqlite3Fts3EvalPhrasePoslist(Fts3Cursor *, Fts3Expr *, int iCol); 
   501    510   int sqlite3Fts3MsrOvfl(Fts3Cursor *, Fts3MultiSegReader *, int *);
   502    511   
   503    512   int sqlite3Fts3DeferredTokenList(Fts3DeferredToken *, char **, int *);
   504    513   
   505         -
          514  +#endif /* SQLITE_ENABLE_FTS3 */
   506    515   #endif /* _FTSINT_H */

Changes to ext/fts3/fts3_aux.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   **
    13     13   */
    14         -
           14  +#include "fts3Int.h"
    15     15   #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
    16     16   
    17         -#include "fts3Int.h"
    18     17   #include <string.h>
    19     18   #include <assert.h>
    20     19   
    21     20   typedef struct Fts3auxTable Fts3auxTable;
    22     21   typedef struct Fts3auxCursor Fts3auxCursor;
    23     22   
    24     23   struct Fts3auxTable {

Changes to ext/fts3/fts3_expr.c.

    11     11   ******************************************************************************
    12     12   **
    13     13   ** This module contains code that implements a parser for fts3 query strings
    14     14   ** (the right-hand argument to the MATCH operator). Because the supported 
    15     15   ** syntax is relatively simple, the whole tokenizer/parser system is
    16     16   ** hand-coded. 
    17     17   */
           18  +#include "fts3Int.h"
    18     19   #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
    19     20   
    20     21   /*
    21     22   ** By default, this module parses the legacy syntax that has been 
    22     23   ** traditionally used by fts3. Or, if SQLITE_ENABLE_FTS3_PARENTHESIS
    23     24   ** is defined, then it uses the new syntax. The differences between
    24     25   ** the new and the old syntaxes are:
................................................................................
    73     74   #endif
    74     75   
    75     76   /*
    76     77   ** Default span for NEAR operators.
    77     78   */
    78     79   #define SQLITE_FTS3_DEFAULT_NEAR_PARAM 10
    79     80   
    80         -#include "fts3Int.h"
    81     81   #include <string.h>
    82     82   #include <assert.h>
    83     83   
    84     84   /*
    85     85   ** isNot:
    86     86   **   This variable is used by function getNextNode(). When getNextNode() is
    87     87   **   called, it sets ParseContext.isNot to true if the 'next node' is a 

Changes to ext/fts3/fts3_hash.c.

    19     19   **
    20     20   **     * The FTS3 module is being built as an extension
    21     21   **       (in which case SQLITE_CORE is not defined), or
    22     22   **
    23     23   **     * The FTS3 module is being built into the core of
    24     24   **       SQLite (in which case SQLITE_ENABLE_FTS3 is defined).
    25     25   */
           26  +#include "fts3Int.h"
    26     27   #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
    27     28   
    28     29   #include <assert.h>
    29     30   #include <stdlib.h>
    30     31   #include <string.h>
    31     32   
    32     33   #include "sqlite3.h"

Changes to ext/fts3/fts3_icu.c.

     6      6   **
     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 fts3 based on the ICU library.
    13         -** 
    14         -** $Id: fts3_icu.c,v 1.3 2008/09/01 18:34:20 danielk1977 Exp $
    15     13   */
    16         -
           14  +#include "fts3Int.h"
    17     15   #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
    18     16   #ifdef SQLITE_ENABLE_ICU
    19     17   
    20     18   #include <assert.h>
    21     19   #include <string.h>
    22     20   #include "fts3_tokenizer.h"
    23     21   

Changes to ext/fts3/fts3_porter.c.

    18     18   **
    19     19   **     * The FTS3 module is being built as an extension
    20     20   **       (in which case SQLITE_CORE is not defined), or
    21     21   **
    22     22   **     * The FTS3 module is being built into the core of
    23     23   **       SQLite (in which case SQLITE_ENABLE_FTS3 is defined).
    24     24   */
    25         -#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
    26         -
    27     25   #include "fts3Int.h"
           26  +#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
    28     27   
    29     28   #include <assert.h>
    30     29   #include <stdlib.h>
    31     30   #include <stdio.h>
    32     31   #include <string.h>
    33     32   
    34     33   #include "fts3_tokenizer.h"

Changes to ext/fts3/fts3_snippet.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   */
    13     13   
           14  +#include "fts3Int.h"
    14     15   #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
    15     16   
    16         -#include "fts3Int.h"
    17     17   #include <string.h>
    18     18   #include <assert.h>
    19     19   
    20     20   /*
    21     21   ** Characters that may appear in the second argument to matchinfo().
    22     22   */
    23     23   #define FTS3_MATCHINFO_NPHRASE   'p'        /* 1 value */

Changes to ext/fts3/fts3_term.c.

    11     11   ******************************************************************************
    12     12   **
    13     13   ** This file is not part of the production FTS code. It is only used for
    14     14   ** testing. It contains a virtual table implementation that provides direct 
    15     15   ** access to the full-text index of an FTS table. 
    16     16   */
    17     17   
           18  +#include "fts3Int.h"
    18     19   #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
    19     20   #ifdef SQLITE_TEST
    20     21   
    21         -#include "fts3Int.h"
    22     22   #include <string.h>
    23     23   #include <assert.h>
    24     24   
    25     25   typedef struct Fts3termTable Fts3termTable;
    26     26   typedef struct Fts3termCursor Fts3termCursor;
    27     27   
    28     28   struct Fts3termTable {

Changes to ext/fts3/fts3_tokenizer.c.

    19     19   **
    20     20   **     * The FTS3 module is being built as an extension
    21     21   **       (in which case SQLITE_CORE is not defined), or
    22     22   **
    23     23   **     * The FTS3 module is being built into the core of
    24     24   **       SQLite (in which case SQLITE_ENABLE_FTS3 is defined).
    25     25   */
    26         -#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
    27         -
    28     26   #include "sqlite3ext.h"
    29     27   #ifndef SQLITE_CORE
    30     28     SQLITE_EXTENSION_INIT1
    31     29   #endif
    32         -
    33     30   #include "fts3Int.h"
           31  +
           32  +#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
           33  +
    34     34   #include <assert.h>
    35     35   #include <string.h>
    36     36   
    37     37   /*
    38     38   ** Implementation of the SQL scalar function for accessing the underlying 
    39     39   ** hash table. This function may be called as follows:
    40     40   **

Changes to ext/fts3/fts3_tokenizer1.c.

    18     18   **
    19     19   **     * The FTS3 module is being built as an extension
    20     20   **       (in which case SQLITE_CORE is not defined), or
    21     21   **
    22     22   **     * The FTS3 module is being built into the core of
    23     23   **       SQLite (in which case SQLITE_ENABLE_FTS3 is defined).
    24     24   */
    25         -#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
    26         -
    27     25   #include "fts3Int.h"
           26  +#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
    28     27   
    29     28   #include <assert.h>
    30     29   #include <stdlib.h>
    31     30   #include <stdio.h>
    32     31   #include <string.h>
    33     32   
    34     33   #include "fts3_tokenizer.h"

Changes to ext/fts3/fts3_write.c.

    13     13   ** This file is part of the SQLite FTS3 extension module. Specifically,
    14     14   ** this file contains code to insert, update and delete rows from FTS3
    15     15   ** tables. It also contains code to merge FTS3 b-tree segments. Some
    16     16   ** of the sub-routines used to merge segments are also used by the query 
    17     17   ** code in fts3.c.
    18     18   */
    19     19   
           20  +#include "fts3Int.h"
    20     21   #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
    21     22   
    22         -#include "fts3Int.h"
    23     23   #include <string.h>
    24     24   #include <assert.h>
    25     25   #include <stdlib.h>
    26     26   
    27     27   /*
    28     28   ** When full-text index nodes are loaded from disk, the buffer that they
    29     29   ** are loaded into has the following number of bytes of padding at the end