SQLite

Check-in [b00ccda307]
Login

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

Overview
Comment:Fix a problem compiling the test code in fts3_test.c when SQLITE_ENABLE_FTS3 is not defined.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b00ccda307caae597c143ab0586f90acb77f79cf
User & Date: dan 2012-03-05 16:24:26.279
Context
2012-03-08
20:00
On Windows, make sure the current directory value used by the test suite is 'normalized' to what the parent command shell sees. Also, clean the test directories used by the quota2.test file. (check-in: 82bcd7ec15 user: mistachkin tags: trunk)
18:39
Add the 'merge=?,?' command to fts4. This still needs some work. (check-in: 741b8f8977 user: dan tags: fts4-incr-merge)
2012-03-07
19:13
If a CHECK constraint is named, report that name on the error message when the constraint fails. (Closed-Leaf check-in: 9a0f90d9de user: drh tags: named-check-constraints)
16:52
Merge in the latest trunk changes. (check-in: ca4708531a user: drh tags: winrt)
2012-03-05
16:39
Pull in all the latest trunk changes. (check-in: 504bf49086 user: drh tags: apple-osx)
16:24
Fix a problem compiling the test code in fts3_test.c when SQLITE_ENABLE_FTS3 is not defined. (check-in: b00ccda307 user: dan tags: trunk)
15:33
Merge the fts4-languageid branch with the trunk. (check-in: 99a9073b5e user: dan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to ext/fts3/fts3_test.c.
313
314
315
316
317
318
319

320
321
322
323
324
325
326

  Tcl_SetObjResult(interp, pRet);
  Tcl_DecrRefCount(pRet);
#endif
  return TCL_OK;
}


/**************************************************************************
** Beginning of test tokenizer code.
**
** For language 0, this tokenizer is similar to the default 'simple' 
** tokenizer. For other languages L, the following:
**
**   * Odd numbered languages are case-sensitive. Even numbered 







>







313
314
315
316
317
318
319
320
321
322
323
324
325
326
327

  Tcl_SetObjResult(interp, pRet);
  Tcl_DecrRefCount(pRet);
#endif
  return TCL_OK;
}

#ifdef SQLITE_ENABLE_FTS3
/**************************************************************************
** Beginning of test tokenizer code.
**
** For language 0, this tokenizer is similar to the default 'simple' 
** tokenizer. For other languages L, the following:
**
**   * Odd numbered languages are case-sensitive. Even numbered 
475
476
477
478
479
480
481

482
483
484
485
486
487
488

489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505

506
507
508
509
510
511
512
  test_tokenizer_cursor *pCsr = (test_tokenizer_cursor *)pCursor;
  pCsr->iLangid = iLangid;
  if( pCsr->iLangid>=100 ){
    rc = SQLITE_ERROR;
  }
  return rc;
}


static int fts3_test_tokenizer_cmd(
  ClientData clientData,
  Tcl_Interp *interp,
  int objc,
  Tcl_Obj *CONST objv[]
){

  static const sqlite3_tokenizer_module testTokenizerModule = {
    1,
    testTokenizerCreate,
    testTokenizerDestroy,
    testTokenizerOpen,
    testTokenizerClose,
    testTokenizerNext,
    testTokenizerLanguage
  };
  const sqlite3_tokenizer_module *pPtr = &testTokenizerModule;
  if( objc!=1 ){
    Tcl_WrongNumArgs(interp, 1, objv, "");
    return TCL_ERROR;
  }
  Tcl_SetObjResult(interp, Tcl_NewByteArrayObj(
    (const unsigned char *)&pPtr, sizeof(sqlite3_tokenizer_module *)
  ));

  return TCL_OK;
}

/* 
** End of tokenizer code.
**************************************************************************/ 








>







>

















>







476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
  test_tokenizer_cursor *pCsr = (test_tokenizer_cursor *)pCursor;
  pCsr->iLangid = iLangid;
  if( pCsr->iLangid>=100 ){
    rc = SQLITE_ERROR;
  }
  return rc;
}
#endif

static int fts3_test_tokenizer_cmd(
  ClientData clientData,
  Tcl_Interp *interp,
  int objc,
  Tcl_Obj *CONST objv[]
){
#ifdef SQLITE_ENABLE_FTS3
  static const sqlite3_tokenizer_module testTokenizerModule = {
    1,
    testTokenizerCreate,
    testTokenizerDestroy,
    testTokenizerOpen,
    testTokenizerClose,
    testTokenizerNext,
    testTokenizerLanguage
  };
  const sqlite3_tokenizer_module *pPtr = &testTokenizerModule;
  if( objc!=1 ){
    Tcl_WrongNumArgs(interp, 1, objv, "");
    return TCL_ERROR;
  }
  Tcl_SetObjResult(interp, Tcl_NewByteArrayObj(
    (const unsigned char *)&pPtr, sizeof(sqlite3_tokenizer_module *)
  ));
#endif
  return TCL_OK;
}

/* 
** End of tokenizer code.
**************************************************************************/