/ Check-in [f9060b2a]
Login

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

Overview
Comment:Merge fixes from trunk.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | apple-osx
Files: files | file ages | folders
SHA1:f9060b2a9860b09ea0e268f6c135a2c78bc8d12d
User & Date: drh 2015-11-13 02:13:18
Context
2015-11-19
19:48
Merge the latest enhancements from trunk. check-in: 2c9e5436 user: drh tags: apple-osx
2015-11-13
02:13
Merge fixes from trunk. check-in: f9060b2a user: drh tags: apple-osx
00:03
Change the error messages so that they can be grepped using '^!' instead of '^ '. There are far too many extraneous outputs that begin with a space. check-in: 367ec0db user: drh tags: trunk
2015-11-12
21:55
Import the test_sqllog.c enhancements from trunk. check-in: 178da339 user: drh tags: apple-osx
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/main.c.

   219    219     ** methods.  The sqlite3_pcache_methods.xInit() all is embedded in the
   220    220     ** call to sqlite3PcacheInitialize().
   221    221     */
   222    222     sqlite3_mutex_enter(sqlite3GlobalConfig.pInitMutex);
   223    223     if( sqlite3GlobalConfig.isInit==0 && sqlite3GlobalConfig.inProgress==0 ){
   224    224       FuncDefHash *pHash = &GLOBAL(FuncDefHash, sqlite3GlobalFunctions);
   225    225       sqlite3GlobalConfig.inProgress = 1;
   226         -#ifdef SQLITE_INIT_SQLLOG
          226  +#ifdef SQLITE_ENABLE_SQLLOG
   227    227       {
   228         -      extern void SQLITE_INIT_SQLLOG(void);
   229         -      SQLITE_INIT_SQLLOG();
          228  +      extern void sqlite3_init_sqllog(void);
          229  +      sqlite3_init_sqllog();
   230    230       }
   231    231   #endif
   232    232       memset(pHash, 0, sizeof(sqlite3GlobalFunctions));
   233    233       sqlite3RegisterGlobalFunctions();
   234    234       if( sqlite3GlobalConfig.isPCacheInit==0 ){
   235    235         rc = sqlite3PcacheInitialize();
   236    236       }

Changes to src/pragma.c.

   745    745     ** number of pages in the cache.  If N is negative, then the
   746    746     ** number of pages is adjusted so that the cache uses -N kibibytes
   747    747     ** of memory.
   748    748     */
   749    749     case PragTyp_CACHE_SIZE: {
   750    750       assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
   751    751       if( !zRight ){
   752         -      if( sqlite3ReadSchema(pParse) ) goto pragma_out;
   753    752         returnSingleInt(v, "cache_size", pDb->pSchema->cache_size);
   754    753       }else{
   755    754         int size = sqlite3Atoi(zRight);
   756    755         pDb->pSchema->cache_size = size;
   757    756         sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size);
   758         -      if( sqlite3ReadSchema(pParse) ) goto pragma_out;
   759    757       }
   760    758       break;
   761    759     }
   762    760   
   763    761     /*
   764    762     **  PRAGMA [schema.]cache_spill
   765    763     **  PRAGMA cache_spill=BOOLEAN

Changes to src/pragma.h.

    83     83     { /* zName:     */ "busy_timeout",
    84     84       /* ePragTyp:  */ PragTyp_BUSY_TIMEOUT,
    85     85       /* ePragFlag: */ 0,
    86     86       /* iArg:      */ 0 },
    87     87   #if !defined(SQLITE_OMIT_PAGER_PRAGMAS)
    88     88     { /* zName:     */ "cache_size",
    89     89       /* ePragTyp:  */ PragTyp_CACHE_SIZE,
    90         -    /* ePragFlag: */ 0,
           90  +    /* ePragFlag: */ PragFlag_NeedSchema,
    91     91       /* iArg:      */ 0 },
    92     92   #endif
    93     93   #if !defined(SQLITE_OMIT_FLAG_PRAGMAS)
    94     94     { /* zName:     */ "cache_spill",
    95     95       /* ePragTyp:  */ PragTyp_CACHE_SPILL,
    96     96       /* ePragFlag: */ 0,
    97     97       /* iArg:      */ 0 },

Changes to src/sqliteInt.h.

   522    522   ** pagecaches for each database connection.  A positive number is the
   523    523   ** number of pages.  A negative number N translations means that a buffer
   524    524   ** of -1024*N bytes is allocated and used for as many pages as it will hold.
   525    525   */
   526    526   #ifndef SQLITE_DEFAULT_PCACHE_INITSZ
   527    527   # define SQLITE_DEFAULT_PCACHE_INITSZ 100
   528    528   #endif
   529         -
   530         -/* 
   531         -** If SQLITE_INIT_SQLLOG is defined, then SQLITE_ENABLE_SQLLOG is 
   532         -** automatically defined as well.
   533         -*/
   534         -#if defined(SQLITE_INIT_SQLLOG) && !defined(SQLITE_ENABLE_SQLLOG)
   535         -# define SQLITE_ENABLE_SQLLOG 1
   536         -#endif
   537         -
   538    529   
   539    530   /*
   540    531   ** GCC does not define the offsetof() macro so we'll have to do it
   541    532   ** ourselves.
   542    533   */
   543    534   #ifndef offsetof
   544    535   #define offsetof(STRUCTURE,FIELD) ((int)((char*)&((STRUCTURE*)0)->FIELD))

Changes to test/tester.tcl.

   768    768           set ok [expr {[string compare $result $expected]==0}]
   769    769         }
   770    770         if {!$ok} {
   771    771           # if {![info exists ::testprefix] || $::testprefix eq ""} {
   772    772           #   error "no test prefix"
   773    773           # }
   774    774           output1 ""
   775         -        output2 " $name expected: \[$expected\]\n $name got:      \[$result\]"
          775  +        output2 "! $name expected: \[$expected\]\n! $name got:      \[$result\]"
   776    776           fail_test $name
   777    777         } else {
   778    778           output1 " Ok"
   779    779         }
   780    780       }
   781    781     } else {
   782    782       output1 " Omitted"
................................................................................
  1052   1052     if {$nKnown>0} {
  1053   1053       output2 "[expr {$nErr-$nKnown}] new errors and $nKnown known errors\
  1054   1054            out of $nTest tests"
  1055   1055     } else {
  1056   1056       output2 "$nErr errors out of $nTest tests"
  1057   1057     }
  1058   1058     if {$nErr>$nKnown} {
  1059         -    output2 -nonewline "Failures on these tests:"
         1059  +    output2 -nonewline "!Failures on these tests:"
  1060   1060       foreach x [set_test_counter fail_list] {
  1061   1061         if {![info exists known_error($x)]} {output2 -nonewline " $x"}
  1062   1062       }
  1063   1063       output2 ""
  1064   1064     }
  1065   1065     foreach warning [set_test_counter warn_list] {
  1066   1066       output2 "Warning: $warning"

Changes to tool/mkpragmatab.tcl.

   164    164     FLAG: NeedSchema
   165    165     IF:   !defined(SQLITE_OMIT_PAGER_PRAGMAS)
   166    166   
   167    167     NAME: journal_size_limit
   168    168     IF:   !defined(SQLITE_OMIT_PAGER_PRAGMAS)
   169    169   
   170    170     NAME: cache_size
          171  +  FLAG: NeedSchema
   171    172     IF:   !defined(SQLITE_OMIT_PAGER_PRAGMAS)
   172    173   
   173    174     NAME: mmap_size
   174    175     IF:   !defined(SQLITE_OMIT_PAGER_PRAGMAS)
   175    176   
   176    177     NAME: auto_vacuum
   177    178     FLAG: NeedSchema