SQLite

Check-in [ca2d1e9036]
Login

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

Overview
Comment:Adjust fuzzershell so that it adds the json1 extension separately for each no connection.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | json-fuzz
Files: files | file ages | folders
SHA1: ca2d1e9036387d1514fe596a0b82a3d8409797c3
User & Date: drh 2015-09-19 14:57:00.533
Context
2015-09-19
16:45
Adjust Makefiles to use SQLITE_CORE when statically linking json1.c into test shells. (Closed-Leaf check-in: 91682ac39e user: drh tags: json-fuzz)
14:57
Adjust fuzzershell so that it adds the json1 extension separately for each no connection. (check-in: ca2d1e9036 user: drh tags: json-fuzz)
14:32
Include json1.c in fuzzcheck and fuzzershell. (check-in: c4b68eff7f user: drh tags: json-fuzz)
Changes
Unified Diff Ignore Whitespace Patch
Changes to tool/fuzzershell.c.
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617

  /* Initialize the input buffer used to hold SQL text */
  if( nInFile==0 ) nInFile = 1;
  nAlloc = 1000;
  zIn = malloc(nAlloc);
  if( zIn==0 ) fatalError("out of memory");

#ifdef SQLITE_ENABLE_JSON1
  {
    extern int sqlite3_json_init(sqlite3*);
    sqlite3_auto_extension((void(*)(void))sqlite3_json_init);
  }
#endif

  /* Loop over all input files */
  for(jj=0; jj<nInFile; jj++){

    /* Read the complete content of the next input file into zIn[] */
    FILE *in;
    if( azInFile ){
      int j, k;







<
<
<
<
<
<
<







597
598
599
600
601
602
603







604
605
606
607
608
609
610

  /* Initialize the input buffer used to hold SQL text */
  if( nInFile==0 ) nInFile = 1;
  nAlloc = 1000;
  zIn = malloc(nAlloc);
  if( zIn==0 ) fatalError("out of memory");








  /* Loop over all input files */
  for(jj=0; jj<nInFile; jj++){

    /* Read the complete content of the next input file into zIn[] */
    FILE *in;
    if( azInFile ){
      int j, k;
723
724
725
726
727
728
729






730
731
732
733
734
735
736
        if( pLook ){
          rc = sqlite3_db_config(db, SQLITE_DBCONFIG_LOOKASIDE,pLook,szLook,nLook);
          if( rc!=SQLITE_OK ) abendError("lookaside configuration filed: %d", rc);
        }
    #ifndef SQLITE_OMIT_TRACE
        sqlite3_trace(db, verboseFlag ? traceCallback : traceNoop, 0);
    #endif






        sqlite3_create_function(db, "eval", 1, SQLITE_UTF8, 0, sqlEvalFunc, 0, 0);
        sqlite3_create_function(db, "eval", 2, SQLITE_UTF8, 0, sqlEvalFunc, 0, 0);
        sqlite3_limit(db, SQLITE_LIMIT_LENGTH, 1000000);
        if( zEncoding ) sqlexec(db, "PRAGMA encoding=%s", zEncoding);
        if( pageSize ) sqlexec(db, "PRAGMA pagesize=%d", pageSize);
        if( doAutovac ) sqlexec(db, "PRAGMA auto_vacuum=FULL");
        iStart = timeOfDay();







>
>
>
>
>
>







716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
        if( pLook ){
          rc = sqlite3_db_config(db, SQLITE_DBCONFIG_LOOKASIDE,pLook,szLook,nLook);
          if( rc!=SQLITE_OK ) abendError("lookaside configuration filed: %d", rc);
        }
    #ifndef SQLITE_OMIT_TRACE
        sqlite3_trace(db, verboseFlag ? traceCallback : traceNoop, 0);
    #endif
#ifdef SQLITE_ENABLE_JSON1
        {
          extern int sqlite3_json_init(sqlite3*);
          sqlite3_json_init(db);
        }
#endif
        sqlite3_create_function(db, "eval", 1, SQLITE_UTF8, 0, sqlEvalFunc, 0, 0);
        sqlite3_create_function(db, "eval", 2, SQLITE_UTF8, 0, sqlEvalFunc, 0, 0);
        sqlite3_limit(db, SQLITE_LIMIT_LENGTH, 1000000);
        if( zEncoding ) sqlexec(db, "PRAGMA encoding=%s", zEncoding);
        if( pageSize ) sqlexec(db, "PRAGMA pagesize=%d", pageSize);
        if( doAutovac ) sqlexec(db, "PRAGMA auto_vacuum=FULL");
        iStart = timeOfDay();