/ Check-in [77c28c2b]
Login

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

Overview
Comment:Merge all version 3.10.0 updates.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | apple-osx
Files: files | file ages | folders
SHA1:77c28c2b2dc601e67a88f55afff53b6cb9a24833
User & Date: drh 2016-01-06 14:35:15
Context
2016-01-11
12:49
Merge enhancements from trunk, and in particular the WAL overwrite feature. check-in: 79125ec9 user: drh tags: apple-osx
2016-01-06
14:35
Merge all version 3.10.0 updates. check-in: 77c28c2b user: drh tags: apple-osx
11:01
Version 3.10.0 check-in: fd0a50f0 user: drh tags: trunk, release, version-3.10.0
2016-01-01
13:31
Merge all recent trunk enhancements. check-in: 5b700f31 user: drh tags: apple-osx
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Makefile.in.

   559    559   #
   560    560   TESTOPTS = --verbose=file --output=test-out.txt
   561    561   
   562    562   # Extra compiler options for various shell tools
   563    563   #
   564    564   SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5
   565    565   FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1
   566         -FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1
          566  +FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5
   567    567   
   568    568   # This is the default Makefile target.  The objects listed here
   569    569   # are what get build when you type just "make" with no arguments.
   570    570   #
   571    571   all:	sqlite3.h libsqlite3.la sqlite3$(TEXE) $(HAVE_TCL:1=libtclsqlite3.la)
   572    572   
   573    573   Makefile: $(TOP)/Makefile.in

Changes to Makefile.msc.

  1214   1214     $(TOP)\test\fuzzdata3.db \
  1215   1215     $(TOP)\test\fuzzdata4.db
  1216   1216   
  1217   1217   # Extra compiler options for various shell tools
  1218   1218   #
  1219   1219   SHELL_COMPILE_OPTS = -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5
  1220   1220   FUZZERSHELL_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1
  1221         -FUZZCHECK_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1
         1221  +FUZZCHECK_COMPILE_OPTS = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5
  1222   1222   
  1223   1223   # Standard options to testfixture
  1224   1224   #
  1225   1225   TESTOPTS = --verbose=file --output=test-out.txt
  1226   1226   
  1227   1227   # This is the default Makefile target.  The objects listed here
  1228   1228   # are what get build when you type just "make" with no arguments.

Changes to main.mk.

   443    443   #
   444    444   TESTOPTS = --verbose=file --output=test-out.txt
   445    445   
   446    446   # Extra compiler options for various shell tools
   447    447   #
   448    448   SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_FTS5
   449    449   FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1
   450         -FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1
          450  +FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5
   451    451   
   452    452   # This is the default Makefile target.  The objects listed here
   453    453   # are what get build when you type just "make" with no arguments.
   454    454   #
   455    455   all:	sqlite3.h libsqlite3.a sqlite3$(EXE)
   456    456   
   457    457   libsqlite3.a:	$(LIBOBJ)

Changes to src/build.c.

  1770   1770     assert( pPk!=0 );
  1771   1771     nPk = pPk->nKeyCol;
  1772   1772   
  1773   1773     /* Make sure every column of the PRIMARY KEY is NOT NULL.  (Except,
  1774   1774     ** do not enforce this for imposter tables.) */
  1775   1775     if( !db->init.imposterTable ){
  1776   1776       for(i=0; i<nPk; i++){
  1777         -      pTab->aCol[pPk->aiColumn[i]].notNull = 1;
         1777  +      pTab->aCol[pPk->aiColumn[i]].notNull = OE_Abort;
  1778   1778       }
  1779   1779       pPk->uniqNotNull = 1;
  1780   1780     }
  1781   1781   
  1782   1782     /* The root page of the PRIMARY KEY is the table root page */
  1783   1783     pPk->tnum = pTab->tnum;
  1784   1784   

Changes to src/shell.c.

   378    378   static void SQLITE_CDECL iotracePrintf(const char *zFormat, ...){
   379    379     va_list ap;
   380    380     char *z;
   381    381     if( iotrace==0 ) return;
   382    382     va_start(ap, zFormat);
   383    383     z = sqlite3_vmprintf(zFormat, ap);
   384    384     va_end(ap);
   385         -  utf8_printf(iotrace, "%s", z);
          385  +  fprintf(iotrace, "%s", z);
   386    386     sqlite3_free(z);
   387    387   }
   388    388   #endif
   389    389   
   390    390   
   391    391   /*
   392    392   ** Determines if a string is a number of not.

Changes to src/sqliteInt.h.

  2738   2738     int iRangeReg;       /* First register in temporary register block */
  2739   2739     int nErr;            /* Number of errors seen */
  2740   2740     int nTab;            /* Number of previously allocated VDBE cursors */
  2741   2741     int nMem;            /* Number of memory cells used so far */
  2742   2742     int nSet;            /* Number of sets used so far */
  2743   2743     int nOnce;           /* Number of OP_Once instructions so far */
  2744   2744     int nOpAlloc;        /* Number of slots allocated for Vdbe.aOp[] */
         2745  +  int szOpAlloc;       /* Bytes of memory space allocated for Vdbe.aOp[] */
  2745   2746     int iFixedOp;        /* Never back out opcodes iFixedOp-1 or earlier */
  2746   2747     int ckBase;          /* Base register of data during check constraints */
  2747   2748     int iSelfTab;        /* Table of an index whose exprs are being coded */
  2748   2749     int iCacheLevel;     /* ColCache valid when aColCache[].iLevel<=iCacheLevel */
  2749   2750     int iCacheCnt;       /* Counter used to generate aColCache[].lru values */
  2750   2751     int nLabel;          /* Number of labels used */
  2751   2752     int *aLabel;         /* Space to hold the labels */
................................................................................
  2969   2970   ** An objected used to accumulate the text of a string where we
  2970   2971   ** do not necessarily know how big the string will be in the end.
  2971   2972   */
  2972   2973   struct StrAccum {
  2973   2974     sqlite3 *db;         /* Optional database for lookaside.  Can be NULL */
  2974   2975     char *zBase;         /* A base allocation.  Not from malloc. */
  2975   2976     char *zText;         /* The string collected so far */
  2976         -  int  nChar;          /* Length of the string so far */
  2977         -  int  nAlloc;         /* Amount of space allocated in zText */
  2978         -  int  mxAlloc;        /* Maximum allowed allocation.  0 for no malloc usage */
         2977  +  u32  nChar;          /* Length of the string so far */
         2978  +  u32  nAlloc;         /* Amount of space allocated in zText */
         2979  +  u32  mxAlloc;        /* Maximum allowed allocation.  0 for no malloc usage */
  2979   2980     u8   accError;       /* STRACCUM_NOMEM or STRACCUM_TOOBIG */
  2980   2981     u8   bMalloced;      /* zText points to allocated space */
  2981   2982   };
  2982   2983   #define STRACCUM_NOMEM   1
  2983   2984   #define STRACCUM_TOOBIG  2
  2984   2985   
  2985   2986   /*

Changes to src/test_fs.c.

    66     66   
    67     67   #include <stdlib.h>
    68     68   #include <string.h>
    69     69   #include <sys/types.h>
    70     70   #include <sys/stat.h>
    71     71   #include <fcntl.h>
    72     72   
    73         -#if SQLITE_OS_UNIX
           73  +#if SQLITE_OS_UNIX || defined(__MINGW_H)
    74     74   # include <unistd.h>
    75     75   # include <dirent.h>
    76     76   # ifndef DIRENT
    77     77   #  define DIRENT dirent
    78     78   # endif
    79     79   #endif
    80     80   #if SQLITE_OS_WIN
    81     81   # include <io.h>
    82         -# include "test_windirent.h"
           82  +# if !defined(__MINGW_H)
           83  +#  include "test_windirent.h"
           84  +# endif
    83     85   # ifndef S_ISREG
    84     86   #  define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
    85     87   # endif
    86     88   #endif
    87     89   
    88     90   #ifndef SQLITE_OMIT_VIRTUALTABLE
    89     91   
................................................................................
   227    229   ** Skip the cursor to the next entry.
   228    230   */
   229    231   static int fsdirNext(sqlite3_vtab_cursor *cur){
   230    232     FsdirCsr *pCsr = (FsdirCsr*)cur;
   231    233   
   232    234     if( pCsr->pDir ){
   233    235       struct DIRENT *pRes = 0;
          236  +#if defined(__MINGW_H)
          237  +    pRes = readdir(pCsr->pDir);
          238  +    if( pRes!=0 ){
          239  +      memcpy(&pCsr->entry, pRes, sizeof(struct DIRENT));
          240  +    }
          241  +#else
   234    242       readdir_r(pCsr->pDir, &pCsr->entry, &pRes);
          243  +#endif
   235    244       if( pRes==0 ){
   236    245         closedir(pCsr->pDir);
   237    246         pCsr->pDir = 0;
   238    247       }
   239    248       pCsr->iRowid++;
   240    249     }
   241    250   

Changes to src/vdbe.c.

  2521   2521         if( (zHdr>=zEndHdr && (zHdr>zEndHdr || offset64!=pC->payloadSize))
  2522   2522          || (offset64 > pC->payloadSize)
  2523   2523         ){
  2524   2524           rc = SQLITE_CORRUPT_BKPT;
  2525   2525           goto op_column_error;
  2526   2526         }
  2527   2527       }else{
  2528         -      VVA_ONLY( t = 0; ) /* Only needed by assert() statements */
         2528  +      t = 0;
  2529   2529       }
  2530   2530   
  2531   2531       /* If after trying to extract new entries from the header, nHdrParsed is
  2532   2532       ** still not up to p2, that means that the record has fewer than p2
  2533   2533       ** columns.  So the result will be either the default value or a NULL.
  2534   2534       */
  2535   2535       if( pC->nHdrParsed<=p2 ){
................................................................................
  3399   3399     ** since moved into the btree layer.  */  
  3400   3400     pCur->isTable = pOp->p4type!=P4_KEYINFO;
  3401   3401   
  3402   3402   open_cursor_set_hints:
  3403   3403     assert( OPFLAG_BULKCSR==BTREE_BULKLOAD );
  3404   3404     assert( OPFLAG_SEEKEQ==BTREE_SEEK_EQ );
  3405   3405     testcase( pOp->p5 & OPFLAG_BULKCSR );
  3406         -#ifdef SQLITE_ENABLE_CURSOR_HINT
         3406  +#ifdef SQLITE_ENABLE_CURSOR_HINTS
  3407   3407     testcase( pOp->p2 & OPFLAG_SEEKEQ );
  3408   3408   #endif
  3409   3409     sqlite3BtreeCursorHintFlags(pCur->uc.pCursor,
  3410   3410                                  (pOp->p5 & (OPFLAG_BULKCSR|OPFLAG_SEEKEQ)));
  3411   3411     break;
  3412   3412   }
  3413   3413   

Changes to src/vdbeaux.c.

    31     31     p->pPrev = 0;
    32     32     db->pVdbe = p;
    33     33     p->magic = VDBE_MAGIC_INIT;
    34     34     p->pParse = pParse;
    35     35     assert( pParse->aLabel==0 );
    36     36     assert( pParse->nLabel==0 );
    37     37     assert( pParse->nOpAlloc==0 );
           38  +  assert( pParse->szOpAlloc==0 );
    38     39     return p;
    39     40   }
    40     41   
    41     42   /*
    42     43   ** Change the error string stored in Vdbe.zErrMsg
    43     44   */
    44     45   void sqlite3VdbeError(Vdbe *p, const char *zFormat, ...){
................................................................................
   120    121     UNUSED_PARAMETER(nOp);
   121    122   #endif
   122    123   
   123    124     assert( nOp<=(1024/sizeof(Op)) );
   124    125     assert( nNew>=(p->nOpAlloc+nOp) );
   125    126     pNew = sqlite3DbRealloc(p->db, v->aOp, nNew*sizeof(Op));
   126    127     if( pNew ){
   127         -    p->nOpAlloc = sqlite3DbMallocSize(p->db, pNew)/sizeof(Op);
          128  +    p->szOpAlloc = sqlite3DbMallocSize(p->db, pNew);
          129  +    p->nOpAlloc = p->szOpAlloc/sizeof(Op);
   128    130       v->aOp = pNew;
   129    131     }
   130    132     return (pNew ? SQLITE_OK : SQLITE_NOMEM);
   131    133   }
   132    134   
   133    135   #ifdef SQLITE_DEBUG
   134    136   /* This routine is just a convenient place to set a breakpoint that will
................................................................................
  1842   1844     ** cursor 0 is stored in memory cell nMem. Memory cell (nMem-1)
  1843   1845     ** stores the blob of memory associated with cursor 1, etc.
  1844   1846     **
  1845   1847     ** See also: allocateCursor().
  1846   1848     */
  1847   1849     nMem += nCursor;
  1848   1850   
  1849         -  /* Allocate space for memory registers, SQL variables, VDBE cursors and 
  1850         -  ** an array to marshal SQL function arguments in.
         1851  +  /* zCsr will initially point to nFree bytes of unused space at the
         1852  +  ** end of the opcode array, p->aOp.  The computation of nFree is
         1853  +  ** conservative - it might be smaller than the true number of free
         1854  +  ** bytes, but never larger.  nFree must be a multiple of 8 - it is
         1855  +  ** rounded down if is not.
  1851   1856     */
  1852         -  zCsr = (u8*)&p->aOp[p->nOp];            /* Memory avaliable for allocation */
  1853         -  assert( pParse->nOpAlloc*sizeof(Op) <= 0x7fffff00 );
  1854         -  nFree = (pParse->nOpAlloc - p->nOp)*sizeof(p->aOp[0]); /* Available space */
         1857  +  n = ROUND8(sizeof(Op)*p->nOp);              /* Bytes of opcode space used */
         1858  +  zCsr = &((u8*)p->aOp)[n];                   /* Unused opcode space */
         1859  +  assert( EIGHT_BYTE_ALIGNMENT(zCsr) );
         1860  +  nFree = ROUNDDOWN8(pParse->szOpAlloc - n);  /* Bytes of unused space */
         1861  +  assert( nFree>=0 );
         1862  +  if( nFree>0 ){
         1863  +    memset(zCsr, 0, nFree);
         1864  +    assert( EIGHT_BYTE_ALIGNMENT(&zCsr[nFree]) );
         1865  +  }
  1855   1866   
  1856   1867     resolveP2Values(p, &nArg);
  1857   1868     p->usesStmtJournal = (u8)(pParse->isMultiWrite && pParse->mayAbort);
  1858   1869     if( pParse->explain && nMem<10 ){
  1859   1870       nMem = 10;
  1860   1871     }
  1861         -  memset(zCsr, 0, nFree);
  1862         -  assert( EIGHT_BYTE_ALIGNMENT(&zCsr[nFree]) );
  1863   1872     p->expired = 0;
  1864   1873   
  1865   1874     p->expired = 0;
  1866   1875     
  1867   1876     /* Memory for registers, parameters, cursor, etc, is allocated in two
  1868   1877     ** passes.  On the first pass, we try to reuse unused space at the 
  1869   1878     ** end of the opcode array.  If we are unable to satisfy all memory

Changes to test/analyzeF.test.

   102    102   proc throw_error {err} { error $err }
   103    103   db func error -deterministic throw_error
   104    104   do_catchsql_test 4.1 {
   105    105     SELECT * FROM t1 WHERE x = error('error one') AND y = 4;
   106    106   } {1 {error one}}
   107    107   
   108    108   do_catchsql_test 4.2 {
   109         -  SELECT * FROM t1 WHERE x = zeroblob(2000000000) AND y = 4;
          109  +  SELECT * FROM t1 WHERE x = zeroblob(2200000000) AND y = 4;
   110    110   } {1 {string or blob too big}}
   111    111   
   112    112   sqlite3_limit db SQLITE_LIMIT_LENGTH 1000000
   113    113   proc dstr {} { return [string repeat x 1100000] }
   114    114   db func dstr -deterministic dstr
   115    115   do_catchsql_test 4.3 {
   116    116     SELECT * FROM t1 WHERE x = dstr() AND y = 11;
................................................................................
   118    118   
   119    119   do_catchsql_test 4.4 {
   120    120     SELECT * FROM t1 WHERE x = test_zeroblob(1100000) AND y = 4;
   121    121   } {1 {string or blob too big}}
   122    122   
   123    123   
   124    124   finish_test
   125         -
   126         -
   127         -

Changes to test/conflict2.test.

   285    285   #   t4     Number of temporary files for statement journals
   286    286   #
   287    287   # Update: Since temporary table files are now opened lazily, and none
   288    288   # of the following tests use large quantities of data, t3 is always 0.
   289    289   #
   290    290   foreach {i conf1 cmd t0 t1 t2 t3 t4} {
   291    291     1 {}       UPDATE                  1 {6 7 8 9}  1 0 1
   292         -  2 REPLACE  UPDATE                  0 {7 6 9}    1 0 0
   293         -  3 IGNORE   UPDATE                  0 {6 7 3 9}  1 0 0
   294         -  4 FAIL     UPDATE                  1 {6 7 3 4}  1 0 0
          292  +  2 REPLACE  UPDATE                  0 {7 6 9}    1 0 1
          293  +  3 IGNORE   UPDATE                  0 {6 7 3 9}  1 0 1
          294  +  4 FAIL     UPDATE                  1 {6 7 3 4}  1 0 1
   295    295     5 ABORT    UPDATE                  1 {1 2 3 4}  1 0 1
   296         -  6 ROLLBACK UPDATE                  1 {1 2 3 4}  0 0 0
          296  +  6 ROLLBACK UPDATE                  1 {1 2 3 4}  0 0 1
   297    297     7 REPLACE  {UPDATE OR IGNORE}      0 {6 7 3 9}  1 0 0
   298    298     8 IGNORE   {UPDATE OR REPLACE}     0 {7 6 9}    1 0 1
   299    299     9 FAIL     {UPDATE OR IGNORE}      0 {6 7 3 9}  1 0 0
   300    300    10 ABORT    {UPDATE OR REPLACE}     0 {7 6 9}    1 0 1
   301    301    11 ROLLBACK {UPDATE OR IGNORE}      0 {6 7 3 9}  1 0 0
   302    302    12 {}       {UPDATE OR IGNORE}      0 {6 7 3 9}  1 0 0
   303    303    13 {}       {UPDATE OR REPLACE}     0 {7 6 9}    1 0 1

Changes to test/cursorhint.test.

    42     42     }
    43     43     return $res
    44     44   }
    45     45   
    46     46   # Run EXPLAIN on $sql.  Return a list of P5 values for all $opcode
    47     47   # opcodes that contain regexp $comment in their comment
    48     48   #
    49         -proc p5_of_opcode {db opcode comment sql} {
           49  +proc p5_of_opcode {db opcode sql} {
    50     50     set res {}
    51     51     $db eval "EXPLAIN $sql" x {
    52         -    if {$x(opcode)==$opcode && [regexp $comment $x(comment)]} {
           52  +    if {$x(opcode)==$opcode} {
    53     53         lappend res $x(p5)
    54     54       }
    55     55     }
    56     56     return $res
    57     57   }
    58     58   
    59     59   # Verify that when t1 is in the outer loop and t2 is in the inner loop,
................................................................................
    62     62   #
    63     63   do_test 1.1 {
    64     64     p4_of_opcode db CursorHint {
    65     65        SELECT * FROM t1 CROSS JOIN t2 WHERE a=x
    66     66     }
    67     67   } {{EQ(r[1],c0)}}
    68     68   do_test 1.2 {
    69         -  p5_of_opcode db OpenRead . {
           69  +  p5_of_opcode db OpenRead {
    70     70        SELECT * FROM t1 CROSS JOIN t2 WHERE a=x
    71     71     }
    72     72   } {00 00}
    73     73   
    74     74   # Do the same test the other way around.
    75     75   #
    76     76   do_test 2.1 {
    77     77     p4_of_opcode db CursorHint {
    78     78        SELECT * FROM t2 CROSS JOIN t1 WHERE a=x
    79     79     }
    80     80   } {{EQ(c0,r[1])}}
    81     81   do_test 2.2 {
    82         -  p5_of_opcode db OpenRead . {
           82  +  p5_of_opcode db OpenRead {
    83     83        SELECT * FROM t2 CROSS JOIN t1 WHERE a=x
    84     84     }
    85     85   } {00 00}
    86     86   
    87     87   # Various expressions captured by CursorHint
    88     88   #
    89     89   do_test 3.1 {
................................................................................
   110    110   } {}
   111    111   do_test 4.1desc {
   112    112     p4_of_opcode db CursorHint {
   113    113       SELECT * FROM t1 WHERE b>11 ORDER BY b DESC;
   114    114     }
   115    115   } {GT(c0,11)}
   116    116   do_test 4.2 {
   117         -  p5_of_opcode db OpenRead . {
          117  +  p5_of_opcode db OpenRead {
   118    118       SELECT * FROM t1 WHERE b>11;
   119    119     }
   120    120   } {02 00}
   121    121   do_test 4.3asc {
   122    122     p4_of_opcode db CursorHint {
   123    123       SELECT c FROM t1 WHERE b<11 ORDER BY b ASC;
   124    124     }
................................................................................
   125    125   } {LT(c0,11)}
   126    126   do_test 4.3desc {
   127    127     p4_of_opcode db CursorHint {
   128    128       SELECT c FROM t1 WHERE b<11 ORDER BY b DESC;
   129    129     }
   130    130   } {}
   131    131   do_test 4.4 {
   132         -  p5_of_opcode db OpenRead . {
          132  +  p5_of_opcode db OpenRead {
   133    133       SELECT c FROM t1 WHERE b<11;
   134    134     }
   135    135   } {00}
   136    136   
   137    137   do_test 4.5asc {
   138    138     p4_of_opcode db CursorHint {
   139    139       SELECT c FROM t1 WHERE b>=10 AND b<=20 ORDER BY b ASC;

Changes to test/releasetest.tcl.

    82     82       -DSQLITE_SOUNDEX=1
    83     83     }
    84     84     "Update-Delete-Limit" {
    85     85       -O2
    86     86       -DSQLITE_DEFAULT_FILE_FORMAT=4
    87     87       -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1
    88     88       -DSQLITE_ENABLE_STMT_SCANSTATUS
           89  +    -DSQLITE_LIKE_DOESNT_MATCH_BLOBS
           90  +    -DSQLITE_ENABLE_CURSOR_HINTS
    89     91       --enable-json1
    90     92     }
    91     93     "Check-Symbols" {
    92     94       -DSQLITE_MEMDEBUG=1
    93     95       -DSQLITE_ENABLE_FTS3_PARENTHESIS=1
    94     96       -DSQLITE_ENABLE_FTS3=1
    95     97       -DSQLITE_ENABLE_RTREE=1
................................................................................
   826    828         -enable-* -
   827    829         -disable-* -
   828    830         *=* {
   829    831           lappend ::EXTRACONFIG [lindex $argv $i]
   830    832         }
   831    833   
   832    834         default {
   833         -        PUTSERR stderr ""
   834         -        PUTSERR stderr [string trim $::USAGE_MESSAGE]
          835  +        PUTSERR ""
          836  +        PUTSERR [string trim $::USAGE_MESSAGE]
   835    837           exit -1
   836    838         }
   837    839       }
   838    840     }
   839    841   
   840    842     if {0==[info exists ::Platforms($platform)]} {
   841    843       PUTS "Unknown platform: $platform"
................................................................................
   941    943     run_all_test_suites $all
   942    944   
   943    945     set elapsetime [expr {[clock seconds]-$STARTTIME}]
   944    946     set hr [expr {$elapsetime/3600}]
   945    947     set min [expr {($elapsetime/60)%60}]
   946    948     set sec [expr {$elapsetime%60}]
   947    949     set etime [format (%02d:%02d:%02d) $hr $min $sec]
          950  +  if {$::JOBS>1} {append etime " $::JOBS cores"}
          951  +  if {[catch {exec hostname} HNAME]==0} {append etime " on $HNAME"}
   948    952     PUTS [string repeat * 79]
   949    953     incr ::NERRCASE $::NERR
   950    954     PUTS "$::NERRCASE failures out of $::NTESTCASE tests in $etime"
   951    955     if {$::SQLITE_VERSION ne ""} {
   952    956       PUTS "SQLite $::SQLITE_VERSION"
   953    957     }
   954    958   }
   955    959   
   956    960   main $argv

Changes to test/vtabH.test.

    28     28     CREATE TABLE t6(a, b TEXT);
    29     29     CREATE INDEX i6 ON t6(b, a);
    30     30     CREATE VIRTUAL TABLE e6 USING echo(t6);
    31     31   }
    32     32   
    33     33   foreach {tn sql expect} {
    34     34     1 "SELECT * FROM e6 WHERE b LIKE 'abc'" {
    35         -    xBestIndex {SELECT rowid, a, b FROM 't6' WHERE b like ?} 
           35  +    xBestIndex {SELECT rowid, a, b FROM 't6' WHERE b like ?}
    36     36       xFilter {SELECT rowid, a, b FROM 't6' WHERE b like ?} abc
    37     37     }
    38     38   
    39     39     2 "SELECT * FROM e6 WHERE b GLOB 'abc'" {
    40         -    xBestIndex {SELECT rowid, a, b FROM 't6' WHERE b glob ?} 
           40  +    xBestIndex {SELECT rowid, a, b FROM 't6' WHERE b glob ?}
    41     41       xFilter {SELECT rowid, a, b FROM 't6' WHERE b glob ?} abc
    42     42     }
    43     43   } {
    44     44     do_test 1.$tn {
    45     45       set echo_module {}
    46     46       execsql $sql
    47     47       set ::echo_module
................................................................................
   111    111   if {1} {
   112    112     reset_db
   113    113     register_fs_module db
   114    114     do_execsql_test 3.0 {
   115    115       SELECT name FROM fsdir WHERE dir = '.' AND name = 'test.db';
   116    116       SELECT name FROM fsdir WHERE dir = '.' AND name = '.'
   117    117     } {test.db .}
   118         -  
          118  +
   119    119     proc list_root_files {} {
   120    120       if {$::tcl_platform(platform) eq "windows"} {
   121    121         set res [list]
   122    122         foreach name [glob -directory $::env(SystemDrive)/ -- *] {
   123    123           if {[string index [file tail $name] 0] eq "."} continue
   124    124           lappend res $name
   125    125         }
................................................................................
   138    138         }
   139    139         return $res
   140    140       } else {
   141    141         return [glob -nocomplain $pattern]
   142    142       }
   143    143     }
   144    144   
   145         -  # Read the first 5 entries from the root directory.
   146         -  #
   147         -  set res [list]
   148         -  foreach p [lrange [list_root_files] 0 4] {
   149         -    if {$::tcl_platform(platform) eq "windows"} {
   150         -      lappend res $p
   151         -    } else {
   152         -      lappend res "/$p"
   153         -    }
   154         -  }
   155         -  do_execsql_test 3.1 {
   156         -    SELECT path FROM fstree LIMIT 5;
   157         -  } $res
   158         -  
   159    145     # Read all entries in the current directory.
   160    146     #
   161    147     proc contents {pattern} {
   162    148       set res [list]
   163    149       foreach f [list_files $pattern] {
   164    150         lappend res $f
   165    151         if {[file isdir $f]} {
................................................................................
   169    155       set res
   170    156     }
   171    157     set pwd "[pwd]/*"
   172    158     set res [contents $pwd]
   173    159     do_execsql_test 3.2 {
   174    160       SELECT path FROM fstree WHERE path GLOB $pwd ORDER BY 1
   175    161     } [lsort $res]
   176         -  
          162  +
   177    163     # Add some sub-directories and files to the current directory.
   178    164     #
   179    165     do_test 3.3 {
   180    166       catch { file delete -force subdir }
   181    167       foreach {path sz} {
   182    168         subdir/x1.txt     143
   183    169         subdir/x2.txt     153
   184         -    } { 
          170  +    } {
   185    171         set dir [file dirname $path]
   186    172         catch { file mkdir $dir }
   187    173         set fd [open $path w]
   188    174         puts -nonewline $fd [string repeat 1 $sz]
   189    175         close $fd
   190    176       }
   191    177     } {}
   192         -  
          178  +
   193    179     set pwd [pwd]
   194    180     do_execsql_test 3.5 {
   195    181       SELECT path, size FROM fstree WHERE path GLOB $pwd || '/subdir/*' ORDER BY 1
   196    182     } [list \
   197    183       "$pwd/subdir/x1.txt" 143 \
   198    184       "$pwd/subdir/x2.txt" 153 \
   199    185     ]

Changes to test/without_rowid5.test.

   128    128   # PRIMARY KEY" do not apply on WITHOUT ROWID tables.
   129    129   #
   130    130   do_execsql_test without_rowid5-5.1 {
   131    131     CREATE TABLE ipk(key INTEGER PRIMARY KEY, val TEXT) WITHOUT ROWID;
   132    132     INSERT INTO ipk VALUES('rival','bonus'); -- ok to insert non-integer key
   133    133     SELECT * FROM ipk;
   134    134   } {rival bonus}
   135         -do_catchsql_test without_rowid5-5.2 {
          135  +do_catchsql_test without_rowid5-5.2a {
          136  +  BEGIN;
   136    137     INSERT INTO ipk VALUES(NULL,'sample'); -- no automatic generation of keys
   137    138   } {1 {NOT NULL constraint failed: ipk.key}}
          139  +do_execsql_test without_rowid5-5.2b {
          140  +  ROLLBACK;
          141  +} {}
   138    142   
   139    143   # EVIDENCE-OF: R-33142-02092 AUTOINCREMENT does not work on WITHOUT
   140    144   # ROWID tables.
   141    145   #
   142    146   # EVIDENCE-OF: R-53084-07740 An error is raised if the "AUTOINCREMENT"
   143    147   # keyword is used in the CREATE TABLE statement for a WITHOUT ROWID
   144    148   # table.