/ Check-in [01d3ee7b]
Login

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

Overview
Comment:Fixes to the JSON1 extension and its use by fuzzcheck to avoid problems when building DLLs.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 01d3ee7bbe4feeb82dcedecbe3c9058c807b18f6
User & Date: drh 2015-10-14 19:52:27
Original Comment: Fixes to the JSON1 extension and to its use by fuzzcheck to avoid problems when building DLLs.
Context
2015-10-16
15:56
Cherrypick the json form-feed fix, and other #ifdef and build script changes to address minor issues that came to light after the 3.9.0 release. Update the version number to 3.9.1. No logic changes except for the form-feed bug-fix in json1 (ticket [57eec374ae1d0a1d4a]). check-in: 746fcd2f user: drh tags: branch-3.9
2015-10-14
20:01
Enable cross-compiling the various tool EXEs with MSVC. check-in: 7d772333 user: mistachkin tags: trunk
19:52
Fixes to the JSON1 extension and its use by fuzzcheck to avoid problems when building DLLs. check-in: 01d3ee7b user: drh tags: trunk
19:44
Fix fuzzcheck.c so that it assumes that JSON1 is already compiled in and does not need to be initialized further. Closed-Leaf check-in: ec003958 user: drh tags: dll-build-fix
12:29
Version 3.9.0 check-in: a721fc0d user: drh tags: trunk, release, version-3.9.0
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ext/misc/json1.c.

  2018   2018       rc = sqlite3_create_module(db, aMod[i].zName, aMod[i].pModule, 0);
  2019   2019     }
  2020   2020   #endif
  2021   2021     return rc;
  2022   2022   }
  2023   2023   
  2024   2024   
         2025  +#ifndef SQLITE_CORE
  2025   2026   #ifdef _WIN32
  2026   2027   __declspec(dllexport)
  2027   2028   #endif
  2028   2029   int sqlite3_json_init(
  2029   2030     sqlite3 *db, 
  2030   2031     char **pzErrMsg, 
  2031   2032     const sqlite3_api_routines *pApi
  2032   2033   ){
  2033   2034     SQLITE_EXTENSION_INIT2(pApi);
  2034   2035     (void)pzErrMsg;  /* Unused parameter */
  2035   2036     return sqlite3Json1Init(db);
  2036   2037   }
         2038  +#endif
  2037   2039   #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_JSON1) */

Changes to test/fuzzcheck.c.

  1122   1122           openFlags = SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE;
  1123   1123           if( nativeFlag && pDb->sz==0 ){
  1124   1124             openFlags |= SQLITE_OPEN_MEMORY;
  1125   1125             zVfs = 0;
  1126   1126           }
  1127   1127           rc = sqlite3_open_v2("main.db", &db, openFlags, zVfs);
  1128   1128           if( rc ) fatalError("cannot open inmem database");
  1129         -#ifdef SQLITE_ENABLE_JSON1
  1130         -        {
  1131         -          extern int sqlite3_json_init(sqlite3*);
  1132         -          sqlite3_json_init(db);
  1133         -        }
  1134         -#endif
  1135   1129           if( cellSzCkFlag ) runSql(db, "PRAGMA cell_size_check=ON", runFlags);
  1136   1130           setAlarm(iTimeout);
  1137   1131   #ifndef SQLITE_OMIT_PROGRESS_CALLBACK
  1138   1132           if( sqlFuzz || vdbeLimitFlag ){
  1139   1133             sqlite3_progress_handler(db, 100000, progressHandler, &vdbeLimitFlag);
  1140   1134           }
  1141   1135   #endif