SQLite

Check-in [e9e76e1281]
Login

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

Overview
Comment:Fix a couple of errors in fts5 compilation. This branch still does not build with -Wall -Werror.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | amalg-json1-fts5
Files: files | file ages | folders
SHA1: e9e76e12812b9b42b1142246b71cea98e26903aa
User & Date: dan 2015-10-08 20:11:42.088
Context
2015-10-08
20:28
Fix two more warnings in fts5 code. (check-in: 5343e601fb user: dan tags: amalg-json1-fts5)
20:11
Fix a couple of errors in fts5 compilation. This branch still does not build with -Wall -Werror. (check-in: e9e76e1281 user: dan tags: amalg-json1-fts5)
19:29
First attempt to add json1 and fts5 to the amalgamation. This check-in does not compile. (check-in: d820a1bd1b user: drh tags: amalg-json1-fts5)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to ext/fts5/fts5_main.c.
2460
2461
2462
2463
2464
2465
2466
2467

2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480

2481
2460
2461
2462
2463
2464
2465
2466

2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479

2480
2481







-
+












-
+

int sqlite3_fts_init(
  sqlite3 *db,
  char **pzErrMsg,
  const sqlite3_api_routines *pApi
){
  SQLITE_EXTENSION_INIT2(pApi);
  (void)pzErrMsg;  /* Unused parameter */
  return sqlite3FtsInit(db);
  return sqlite3Fts5Init(db);
}

#ifdef _WIN32
__declspec(dllexport)
#endif
int sqlite3_fts5_init(
  sqlite3 *db,
  char **pzErrMsg,
  const sqlite3_api_routines *pApi
){
  SQLITE_EXTENSION_INIT2(pApi);
  (void)pzErrMsg;  /* Unused parameter */
  return sqlite3FtsInit(db);
  return sqlite3Fts5Init(db);
}
Changes to ext/fts5/fts5_tcl.c.
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
972
973
974
975
976
977
978

979
980
981
982
983
984
985







-








static int f5tTokenHash(
  void * clientData,
  Tcl_Interp *interp,
  int objc,
  Tcl_Obj *CONST objv[]
){
  int bOld = sqlite3_fts5_may_be_corrupt;
  char *z;
  int n;
  unsigned int iVal;
  int nSlot;

  if( objc!=3 ){
    Tcl_WrongNumArgs(interp, 1, objv, "NSLOT TOKEN");
Changes to src/main.c.
2634
2635
2636
2637
2638
2639
2640







2641
2642
2643
2644
2645
2646
2647
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654







+
+
+
+
+
+
+







    zFile = 0;
  }
  *pFlags = flags;
  *pzFile = zFile;
  return rc;
}

#ifdef SQLITE_ENABLE_FTS5
#ifdef SQLITE_AMALGAMATION
static int sqlite3Fts5Init(sqlite3*);
#else
extern int sqlite3Fts5Init(sqlite3*);
#endif
#endif

/*
** This routine does the work of opening a database on behalf of
** sqlite3_open() and sqlite3_open16(). The database filename "zFilename"  
** is UTF-8 encoded.
*/
static int openDatabase(
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2883
2884
2885
2886
2887
2888
2889

2890
2891
2892
2893
2894
2895
2896







-







  if( !db->mallocFailed && rc==SQLITE_OK ){
    rc = sqlite3Fts3Init(db);
  }
#endif

#ifdef SQLITE_ENABLE_FTS5
  if( !db->mallocFailed && rc==SQLITE_OK ){
    extern int sqlite3Fts5Init(sqlite3*);
    rc = sqlite3Fts5Init(db);
  }
#endif

#ifdef SQLITE_ENABLE_ICU
  if( !db->mallocFailed && rc==SQLITE_OK ){
    rc = sqlite3IcuInit(db);