/ Check-in [746fcd2f]
Login

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

Overview
Comment: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]).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | branch-3.9
Files: files | file ages | folders
SHA1: 746fcd2fd412ddc27071827fb20eb6df0741dfb1
User & Date: drh 2015-10-16 15:56:27
Original Comment: 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.0. No logic changes except for the form-feed bug-fix in json1 (ticket [57eec374ae1d0a1d4a]).
Context
2015-10-16
17:31
Version 3.9.1 check-in: 767c1727 user: drh tags: release, branch-3.9, version-3.9.1
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
15:42
Fix the fuzzershell utility program so that it compiles with the amalgamation that includes JSON1 support. check-in: d6fc616e user: drh tags: trunk
15:35
Fix the JSON1 extension so that it does not depend on isdigit() and strtod() from the standard library when compiled into SQLite as part of the amalgamation. check-in: bc9a9a60 user: drh tags: trunk
15:16
Form-feed is not valid whitespace for json. Fix for ticket [57eec374ae1d0a1d] check-in: 28957d63 user: drh tags: trunk
2015-10-15
12:06
Make sure sqlite.h is not #included by itself. check-in: a61880c2 user: drh tags: trunk
2015-10-14
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
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 VERSION.

     1         -3.9.0
            1  +3.9.1

Changes to configure.

     1      1   #! /bin/sh
     2      2   # Guess values for system-dependent variables and create Makefiles.
     3         -# Generated by GNU Autoconf 2.69 for sqlite 3.9.0.
            3  +# Generated by GNU Autoconf 2.69 for sqlite 3.9.1.
     4      4   #
     5      5   #
     6      6   # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
     7      7   #
     8      8   #
     9      9   # This configure script is free software; the Free Software Foundation
    10     10   # gives unlimited permission to copy, distribute and modify it.
................................................................................
   722    722   subdirs=
   723    723   MFLAGS=
   724    724   MAKEFLAGS=
   725    725   
   726    726   # Identity of this package.
   727    727   PACKAGE_NAME='sqlite'
   728    728   PACKAGE_TARNAME='sqlite'
   729         -PACKAGE_VERSION='3.9.0'
   730         -PACKAGE_STRING='sqlite 3.9.0'
          729  +PACKAGE_VERSION='3.9.1'
          730  +PACKAGE_STRING='sqlite 3.9.1'
   731    731   PACKAGE_BUGREPORT=''
   732    732   PACKAGE_URL=''
   733    733   
   734    734   # Factoring default headers for most tests.
   735    735   ac_includes_default="\
   736    736   #include <stdio.h>
   737    737   #ifdef HAVE_SYS_TYPES_H
................................................................................
  1455   1455   #
  1456   1456   # Report the --help message.
  1457   1457   #
  1458   1458   if test "$ac_init_help" = "long"; then
  1459   1459     # Omit some internal or obsolete options to make the list less imposing.
  1460   1460     # This message is too long to be a string in the A/UX 3.1 sh.
  1461   1461     cat <<_ACEOF
  1462         -\`configure' configures sqlite 3.9.0 to adapt to many kinds of systems.
         1462  +\`configure' configures sqlite 3.9.1 to adapt to many kinds of systems.
  1463   1463   
  1464   1464   Usage: $0 [OPTION]... [VAR=VALUE]...
  1465   1465   
  1466   1466   To assign environment variables (e.g., CC, CFLAGS...), specify them as
  1467   1467   VAR=VALUE.  See below for descriptions of some of the useful variables.
  1468   1468   
  1469   1469   Defaults for the options are specified in brackets.
................................................................................
  1520   1520     --build=BUILD     configure for building on BUILD [guessed]
  1521   1521     --host=HOST       cross-compile to build programs to run on HOST [BUILD]
  1522   1522   _ACEOF
  1523   1523   fi
  1524   1524   
  1525   1525   if test -n "$ac_init_help"; then
  1526   1526     case $ac_init_help in
  1527         -     short | recursive ) echo "Configuration of sqlite 3.9.0:";;
         1527  +     short | recursive ) echo "Configuration of sqlite 3.9.1:";;
  1528   1528      esac
  1529   1529     cat <<\_ACEOF
  1530   1530   
  1531   1531   Optional Features:
  1532   1532     --disable-option-checking  ignore unrecognized --enable/--with options
  1533   1533     --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  1534   1534     --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
................................................................................
  1640   1640       cd "$ac_pwd" || { ac_status=$?; break; }
  1641   1641     done
  1642   1642   fi
  1643   1643   
  1644   1644   test -n "$ac_init_help" && exit $ac_status
  1645   1645   if $ac_init_version; then
  1646   1646     cat <<\_ACEOF
  1647         -sqlite configure 3.9.0
         1647  +sqlite configure 3.9.1
  1648   1648   generated by GNU Autoconf 2.69
  1649   1649   
  1650   1650   Copyright (C) 2012 Free Software Foundation, Inc.
  1651   1651   This configure script is free software; the Free Software Foundation
  1652   1652   gives unlimited permission to copy, distribute and modify it.
  1653   1653   _ACEOF
  1654   1654     exit
................................................................................
  2059   2059     eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
  2060   2060   
  2061   2061   } # ac_fn_c_check_header_mongrel
  2062   2062   cat >config.log <<_ACEOF
  2063   2063   This file contains any messages produced by compilers while
  2064   2064   running configure, to aid debugging if configure makes a mistake.
  2065   2065   
  2066         -It was created by sqlite $as_me 3.9.0, which was
         2066  +It was created by sqlite $as_me 3.9.1, which was
  2067   2067   generated by GNU Autoconf 2.69.  Invocation command line was
  2068   2068   
  2069   2069     $ $0 $@
  2070   2070   
  2071   2071   _ACEOF
  2072   2072   exec 5>>config.log
  2073   2073   {
................................................................................
 11985  11985   test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
 11986  11986   
 11987  11987   cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 11988  11988   # Save the log message, to keep $0 and so on meaningful, and to
 11989  11989   # report actual input values of CONFIG_FILES etc. instead of their
 11990  11990   # values after options handling.
 11991  11991   ac_log="
 11992         -This file was extended by sqlite $as_me 3.9.0, which was
        11992  +This file was extended by sqlite $as_me 3.9.1, which was
 11993  11993   generated by GNU Autoconf 2.69.  Invocation command line was
 11994  11994   
 11995  11995     CONFIG_FILES    = $CONFIG_FILES
 11996  11996     CONFIG_HEADERS  = $CONFIG_HEADERS
 11997  11997     CONFIG_LINKS    = $CONFIG_LINKS
 11998  11998     CONFIG_COMMANDS = $CONFIG_COMMANDS
 11999  11999     $ $0 $@
................................................................................
 12051  12051   
 12052  12052   Report bugs to the package provider."
 12053  12053   
 12054  12054   _ACEOF
 12055  12055   cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 12056  12056   ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 12057  12057   ac_cs_version="\\
 12058         -sqlite config.status 3.9.0
        12058  +sqlite config.status 3.9.1
 12059  12059   configured by $0, generated by GNU Autoconf 2.69,
 12060  12060     with options \\"\$ac_cs_config\\"
 12061  12061   
 12062  12062   Copyright (C) 2012 Free Software Foundation, Inc.
 12063  12063   This config.status script is free software; the Free Software Foundation
 12064  12064   gives unlimited permission to copy, distribute and modify it."
 12065  12065   

Changes to ext/misc/json1.c.

    24     24   #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_JSON1)
    25     25   #if !defined(_SQLITEINT_H_)
    26     26   #include "sqlite3ext.h"
    27     27   #endif
    28     28   SQLITE_EXTENSION_INIT1
    29     29   #include <assert.h>
    30     30   #include <string.h>
    31         -#include <ctype.h>  /* amalgamator: keep */
    32     31   #include <stdlib.h>
    33     32   #include <stdarg.h>
    34     33   
    35     34   #define UNUSED_PARAM(X)  (void)(X)
    36     35   
    37     36   #ifndef LARGEST_INT64
    38     37   # define LARGEST_INT64  (0xffffffff|(((sqlite3_int64)0x7fffffff)<<32))
................................................................................
    39     38   # define SMALLEST_INT64 (((sqlite3_int64)-1) - LARGEST_INT64)
    40     39   #endif
    41     40   
    42     41   /*
    43     42   ** Versions of isspace(), isalnum() and isdigit() to which it is safe
    44     43   ** to pass signed char values.
    45     44   */
    46         -#define safe_isdigit(x) isdigit((unsigned char)(x))
    47         -#define safe_isalnum(x) isalnum((unsigned char)(x))
           45  +#ifdef sqlite3Isdigit
           46  +   /* Use the SQLite core versions if this routine is part of the
           47  +   ** SQLite amalgamation */
           48  +#  define safe_isdigit(x) sqlite3Isdigit(x)
           49  +#  define safe_isalnum(x) sqlite3Isalnum(x)
           50  +#else
           51  +   /* Use the standard library for separate compilation */
           52  +#include <ctype.h>  /* amalgamator: keep */
           53  +#  define safe_isdigit(x) isdigit((unsigned char)(x))
           54  +#  define safe_isalnum(x) isalnum((unsigned char)(x))
           55  +#endif
    48     56   
    49     57   /*
    50     58   ** Growing our own isspace() routine this way is twice as fast as
    51     59   ** the library isspace() function, resulting in a 7% overall performance
    52     60   ** increase for the parser.  (Ubuntu14.10 gcc 4.8.4 x64 with -Os).
    53     61   */
    54     62   static const char jsonIsSpace[] = {
    55         -  0, 0, 0, 0, 0, 0, 0, 0,     0, 1, 1, 0, 1, 1, 0, 0,
           63  +  0, 0, 0, 0, 0, 0, 0, 0,     0, 1, 1, 0, 0, 1, 0, 0,
    56     64     0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,
    57     65     1, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,
    58     66     0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,
    59     67     0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,
    60     68     0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,
    61     69     0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,
    62     70     0, 0, 0, 0, 0, 0, 0, 0,     0, 0, 0, 0, 0, 0, 0, 0,
................................................................................
   510    518         if( pNode->u.zJContent[0]=='-' ){ i = -i; }
   511    519         sqlite3_result_int64(pCtx, i);
   512    520         int_done:
   513    521         break;
   514    522         int_as_real: /* fall through to real */;
   515    523       }
   516    524       case JSON_REAL: {
   517         -      double r = strtod(pNode->u.zJContent, 0);
          525  +      double r;
          526  +#ifdef SQLITE_AMALGAMATION
          527  +      const char *z = pNode->u.zJContent;
          528  +      sqlite3AtoF(z, &r, sqlite3Strlen30(z), SQLITE_UTF8);
          529  +#else
          530  +      r = strtod(pNode->u.zJContent, 0);
          531  +#endif
   518    532         sqlite3_result_double(pCtx, r);
   519    533         break;
   520    534       }
   521    535       case JSON_STRING: {
   522    536   #if 0 /* Never happens because JNODE_RAW is only set by json_set(),
   523    537         ** json_insert() and json_replace() and those routines do not
   524    538         ** call jsonReturn() */
................................................................................
  2018   2032       rc = sqlite3_create_module(db, aMod[i].zName, aMod[i].pModule, 0);
  2019   2033     }
  2020   2034   #endif
  2021   2035     return rc;
  2022   2036   }
  2023   2037   
  2024   2038   
         2039  +#ifndef SQLITE_CORE
  2025   2040   #ifdef _WIN32
  2026   2041   __declspec(dllexport)
  2027   2042   #endif
  2028   2043   int sqlite3_json_init(
  2029   2044     sqlite3 *db, 
  2030   2045     char **pzErrMsg, 
  2031   2046     const sqlite3_api_routines *pApi
  2032   2047   ){
  2033   2048     SQLITE_EXTENSION_INIT2(pApi);
  2034   2049     (void)pzErrMsg;  /* Unused parameter */
  2035   2050     return sqlite3Json1Init(db);
  2036   2051   }
         2052  +#endif
  2037   2053   #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

Changes to tool/fuzzershell.c.

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

Changes to tool/mksqlite3h.tcl.

    94     94     while {![eof $in]} {
    95     95     
    96     96       set line [gets $in]
    97     97   
    98     98       # File sqlite3rtree.h contains a line "#include <sqlite3.h>". Omit this
    99     99       # line when copying sqlite3rtree.h into sqlite3.h.
   100    100       #
   101         -    if {[string match {*#include*<sqlite3.h>*} $line]} continue
          101  +    if {[string match {*#include*[<"]sqlite3.h[>"]*} $line]} continue
   102    102     
   103    103       regsub -- --VERS--           $line $zVersion line
   104    104       regsub -- --VERSION-NUMBER-- $line $nVersion line
   105    105       regsub -- --SOURCE-ID--      $line "$zDate $zUuid" line
   106    106   
   107    107       if {[regexp $varpattern $line] && ![regexp {^ *typedef} $line]} {
   108    108         set line "SQLITE_API $line"