SQLite
Check-in Differences
Not logged in

Difference From:

[e4ab094f] Version 3.8.7 (user: drh tags: trunk, release, version-3.8.7, date: 2014-10-17 11:24:17)

To:

[83afe23e] Increase the version number to 3.8.7.1 (user: drh tags: branch-3.8.7, date: 2014-10-29 01:27:43)

Changes to VERSION.

     1         -3.8.7
            1  +3.8.7.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.62 for sqlite 3.8.7.
            3  +# Generated by GNU Autoconf 2.62 for sqlite 3.8.7.1.
     4      4   #
     5      5   # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
     6      6   # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
     7      7   # This configure script is free software; the Free Software Foundation
     8      8   # gives unlimited permission to copy, distribute and modify it.
     9      9   ## --------------------- ##
    10     10   ## M4sh Initialization.  ##
................................................................................
   739    739   MFLAGS=
   740    740   MAKEFLAGS=
   741    741   SHELL=${CONFIG_SHELL-/bin/sh}
   742    742   
   743    743   # Identity of this package.
   744    744   PACKAGE_NAME='sqlite'
   745    745   PACKAGE_TARNAME='sqlite'
   746         -PACKAGE_VERSION='3.8.7'
   747         -PACKAGE_STRING='sqlite 3.8.7'
          746  +PACKAGE_VERSION='3.8.7.1'
          747  +PACKAGE_STRING='sqlite 3.8.7.1'
   748    748   PACKAGE_BUGREPORT=''
   749    749   
   750    750   # Factoring default headers for most tests.
   751    751   ac_includes_default="\
   752    752   #include <stdio.h>
   753    753   #ifdef HAVE_SYS_TYPES_H
   754    754   # include <sys/types.h>
................................................................................
  1479   1479   #
  1480   1480   # Report the --help message.
  1481   1481   #
  1482   1482   if test "$ac_init_help" = "long"; then
  1483   1483     # Omit some internal or obsolete options to make the list less imposing.
  1484   1484     # This message is too long to be a string in the A/UX 3.1 sh.
  1485   1485     cat <<_ACEOF
  1486         -\`configure' configures sqlite 3.8.7 to adapt to many kinds of systems.
         1486  +\`configure' configures sqlite 3.8.7.1 to adapt to many kinds of systems.
  1487   1487   
  1488   1488   Usage: $0 [OPTION]... [VAR=VALUE]...
  1489   1489   
  1490   1490   To assign environment variables (e.g., CC, CFLAGS...), specify them as
  1491   1491   VAR=VALUE.  See below for descriptions of some of the useful variables.
  1492   1492   
  1493   1493   Defaults for the options are specified in brackets.
................................................................................
  1544   1544     --build=BUILD     configure for building on BUILD [guessed]
  1545   1545     --host=HOST       cross-compile to build programs to run on HOST [BUILD]
  1546   1546   _ACEOF
  1547   1547   fi
  1548   1548   
  1549   1549   if test -n "$ac_init_help"; then
  1550   1550     case $ac_init_help in
  1551         -     short | recursive ) echo "Configuration of sqlite 3.8.7:";;
         1551  +     short | recursive ) echo "Configuration of sqlite 3.8.7.1:";;
  1552   1552      esac
  1553   1553     cat <<\_ACEOF
  1554   1554   
  1555   1555   Optional Features:
  1556   1556     --disable-option-checking  ignore unrecognized --enable/--with options
  1557   1557     --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  1558   1558     --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
................................................................................
  1660   1660       cd "$ac_pwd" || { ac_status=$?; break; }
  1661   1661     done
  1662   1662   fi
  1663   1663   
  1664   1664   test -n "$ac_init_help" && exit $ac_status
  1665   1665   if $ac_init_version; then
  1666   1666     cat <<\_ACEOF
  1667         -sqlite configure 3.8.7
         1667  +sqlite configure 3.8.7.1
  1668   1668   generated by GNU Autoconf 2.62
  1669   1669   
  1670   1670   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
  1671   1671   2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
  1672   1672   This configure script is free software; the Free Software Foundation
  1673   1673   gives unlimited permission to copy, distribute and modify it.
  1674   1674   _ACEOF
  1675   1675     exit
  1676   1676   fi
  1677   1677   cat >config.log <<_ACEOF
  1678   1678   This file contains any messages produced by compilers while
  1679   1679   running configure, to aid debugging if configure makes a mistake.
  1680   1680   
  1681         -It was created by sqlite $as_me 3.8.7, which was
         1681  +It was created by sqlite $as_me 3.8.7.1, which was
  1682   1682   generated by GNU Autoconf 2.62.  Invocation command line was
  1683   1683   
  1684   1684     $ $0 $@
  1685   1685   
  1686   1686   _ACEOF
  1687   1687   exec 5>>config.log
  1688   1688   {
................................................................................
 14017  14017   
 14018  14018   exec 6>&1
 14019  14019   
 14020  14020   # Save the log message, to keep $[0] and so on meaningful, and to
 14021  14021   # report actual input values of CONFIG_FILES etc. instead of their
 14022  14022   # values after options handling.
 14023  14023   ac_log="
 14024         -This file was extended by sqlite $as_me 3.8.7, which was
        14024  +This file was extended by sqlite $as_me 3.8.7.1, which was
 14025  14025   generated by GNU Autoconf 2.62.  Invocation command line was
 14026  14026   
 14027  14027     CONFIG_FILES    = $CONFIG_FILES
 14028  14028     CONFIG_HEADERS  = $CONFIG_HEADERS
 14029  14029     CONFIG_LINKS    = $CONFIG_LINKS
 14030  14030     CONFIG_COMMANDS = $CONFIG_COMMANDS
 14031  14031     $ $0 $@
................................................................................
 14070  14070   $config_commands
 14071  14071   
 14072  14072   Report bugs to <bug-autoconf@gnu.org>."
 14073  14073   
 14074  14074   _ACEOF
 14075  14075   cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 14076  14076   ac_cs_version="\\
 14077         -sqlite config.status 3.8.7
        14077  +sqlite config.status 3.8.7.1
 14078  14078   configured by $0, generated by GNU Autoconf 2.62,
 14079  14079     with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 14080  14080   
 14081  14081   Copyright (C) 2008 Free Software Foundation, Inc.
 14082  14082   This config.status script is free software; the Free Software Foundation
 14083  14083   gives unlimited permission to copy, distribute and modify it."
 14084  14084   

Changes to src/delete.c.

   477    477       ** where-clause loop above.
   478    478       */
   479    479       if( okOnePass ){
   480    480         /* Just one row.  Hence the top-of-loop is a no-op */
   481    481         assert( nKey==nPk );  /* OP_Found will use an unpacked key */
   482    482         assert( !IsVirtual(pTab) );
   483    483         if( aToOpen[iDataCur-iTabCur] ){
   484         -        assert( pPk!=0 );
          484  +        assert( pPk!=0 || pTab->pSelect!=0 );
   485    485           sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, addrBypass, iKey, nKey);
   486    486           VdbeCoverage(v);
   487    487         }
   488    488       }else if( pPk ){
   489    489         addrLoop = sqlite3VdbeAddOp1(v, OP_Rewind, iEphCur); VdbeCoverage(v);
   490    490         sqlite3VdbeAddOp2(v, OP_RowKey, iEphCur, iKey);
   491    491         assert( nKey==0 );  /* OP_Found will use a composite key */

Changes to src/pager.c.

  1937   1937         assert( pPager->journalMode==PAGER_JOURNALMODE_MEMORY );
  1938   1938         sqlite3OsClose(pPager->jfd);
  1939   1939       }else if( pPager->journalMode==PAGER_JOURNALMODE_TRUNCATE ){
  1940   1940         if( pPager->journalOff==0 ){
  1941   1941           rc = SQLITE_OK;
  1942   1942         }else{
  1943   1943           rc = sqlite3OsTruncate(pPager->jfd, 0);
         1944  +        if( rc==SQLITE_OK && pPager->fullSync ){
         1945  +          /* Make sure the new file size is written into the inode right away.
         1946  +          ** Otherwise the journal might resurrect following a power loss and
         1947  +          ** cause the last transaction to roll back.  See
         1948  +          ** https://bugzilla.mozilla.org/show_bug.cgi?id=1072773
         1949  +          */
         1950  +          rc = sqlite3OsSync(pPager->jfd, pPager->syncFlags);
         1951  +        }
  1944   1952         }
  1945   1953         pPager->journalOff = 0;
  1946   1954       }else if( pPager->journalMode==PAGER_JOURNALMODE_PERSIST
  1947   1955         || (pPager->exclusiveMode && pPager->journalMode!=PAGER_JOURNALMODE_WAL)
  1948   1956       ){
  1949   1957         rc = zeroJournalHdr(pPager, hasMaster);
  1950   1958         pPager->journalOff = 0;

Changes to src/printf.c.

    17     17   /*
    18     18   ** If the strchrnul() library function is available, then set
    19     19   ** HAVE_STRCHRNUL.  If that routine is not available, this module
    20     20   ** will supply its own.  The built-in version is slower than
    21     21   ** the glibc version so the glibc version is definitely preferred.
    22     22   */
    23     23   #if !defined(HAVE_STRCHRNUL)
    24         -# if defined(linux)
    25         -#  define HAVE_STRCHRNUL 1
    26         -# else
    27         -#  define HAVE_STRCHRNUL 0
    28         -# endif
           24  +# define HAVE_STRCHRNUL 0
    29     25   #endif
    30     26   
    31     27   
    32     28   /*
    33     29   ** Conversion types fall into various categories as defined by the
    34     30   ** following enumeration.
    35     31   */

Changes to src/update.c.

   427    427       }
   428    428       sqlite3OpenTableAndIndices(pParse, pTab, OP_OpenWrite, iBaseCur, aToOpen,
   429    429                                  0, 0);
   430    430     }
   431    431   
   432    432     /* Top of the update loop */
   433    433     if( okOnePass ){
   434         -    if( aToOpen[iDataCur-iBaseCur] ){
   435         -      assert( pPk!=0 );
          434  +    if( aToOpen[iDataCur-iBaseCur] && !isView ){
          435  +      assert( pPk );
   436    436         sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, labelBreak, regKey, nKey);
   437    437         VdbeCoverageNeverTaken(v);
   438    438       }
   439    439       labelContinue = labelBreak;
   440    440       sqlite3VdbeAddOp2(v, OP_IsNull, pPk ? regKey : regOldRowid, labelBreak);
   441    441       VdbeCoverageIf(v, pPk==0);
   442    442       VdbeCoverageIf(v, pPk!=0);

Changes to src/vdbe.c.

  2437   2437       ** still not up to p2, that means that the record has fewer than p2
  2438   2438       ** columns.  So the result will be either the default value or a NULL.
  2439   2439       */
  2440   2440       if( pC->nHdrParsed<=p2 ){
  2441   2441         if( pOp->p4type==P4_MEM ){
  2442   2442           sqlite3VdbeMemShallowCopy(pDest, pOp->p4.pMem, MEM_Static);
  2443   2443         }else{
  2444         -        MemSetTypeFlag(pDest, MEM_Null);
         2444  +        sqlite3VdbeMemSetNull(pDest);
  2445   2445         }
  2446   2446         goto op_column_out;
  2447   2447       }
  2448   2448     }
  2449   2449   
  2450   2450     /* Extract the content for the p2+1-th column.  Control can only
  2451   2451     ** reach this point if aOffset[p2], aOffset[p2+1], and pC->aType[p2] are

Changes to test/trigger9.test.

    28     28   
    29     29   set testdir [file dirname $argv0]
    30     30   source $testdir/tester.tcl
    31     31   ifcapable {!trigger} {
    32     32     finish_test
    33     33     return
    34     34   }
           35  +set ::testprefix trigger9
    35     36   
    36     37   proc has_rowdata {sql} {
    37     38     expr {[lsearch [execsql "explain $sql"] RowData]>=0}
    38     39   }
    39     40   
    40     41   do_test trigger9-1.1 {
    41     42     execsql {
................................................................................
   215    216           END;
   216    217           UPDATE v1 SET b = 'hello';
   217    218           SELECT * FROM t2;
   218    219         ROLLBACK;
   219    220       }
   220    221     } {2}
   221    222   }
          223  +
          224  +reset_db
          225  +do_execsql_test 4.1 {
          226  +  CREATE TABLE t1(a, b);
          227  +  CREATE TABLE log(x);
          228  +  INSERT INTO t1 VALUES(1, 2);
          229  +  INSERT INTO t1 VALUES(3, 4);
          230  +  CREATE VIEW v1 AS SELECT a, b FROM t1;
          231  +
          232  +  CREATE TRIGGER tr1 INSTEAD OF DELETE ON v1 BEGIN
          233  +    INSERT INTO log VALUES('delete');
          234  +  END;
          235  +
          236  +  CREATE TRIGGER tr2 INSTEAD OF UPDATE ON v1 BEGIN
          237  +    INSERT INTO log VALUES('update');
          238  +  END;
          239  +
          240  +  CREATE TRIGGER tr3 INSTEAD OF INSERT ON v1 BEGIN
          241  +    INSERT INTO log VALUES('insert');
          242  +  END;
          243  +}
          244  +
          245  +do_execsql_test 4.2 {
          246  +  DELETE FROM v1 WHERE rowid=1;
          247  +} {}
          248  +
          249  +do_execsql_test 4.3 {
          250  +  UPDATE v1 SET a=b WHERE rowid=2;
          251  +} {}
          252  +
          253  +
          254  +
   222    255   
   223    256   finish_test

Changes to test/update.test.

   600    600     catchsql {
   601    601       UPDATE t4 SET a=1;
   602    602     }
   603    603   } {1 {no such column: nosuchcol}}
   604    604   
   605    605   } ;# ifcapable {trigger}
   606    606   
          607  +# Ticket [https://www.sqlite.org/src/tktview/43107840f1c02] on 2014-10-29
          608  +# An assertion fault on UPDATE
          609  +#
          610  +do_execsql_test update-15.1 {
          611  +  CREATE TABLE t15(a INTEGER PRIMARY KEY, b);
          612  +  INSERT INTO t15(a,b) VALUES(10,'abc'),(20,'def'),(30,'ghi');
          613  +  ALTER TABLE t15 ADD COLUMN c;
          614  +  CREATE INDEX t15c ON t15(c);
          615  +  INSERT INTO t15(a,b)
          616  +   VALUES(5,'zyx'),(15,'wvu'),(25,'tsr'),(35,'qpo');
          617  +  UPDATE t15 SET c=printf("y%d",a) WHERE c IS NULL;
          618  +  SELECT a,b,c,'|' FROM t15 ORDER BY a;
          619  +} {5 zyx y5 | 10 abc y10 | 15 wvu y15 | 20 def y20 | 25 tsr y25 | 30 ghi y30 | 35 qpo y35 |}
          620  +
   607    621   
   608    622   finish_test