/ Check-in [12e7d9ec]
Login

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

Overview
Comment:Always parse the schema *before* running "PRAGMA cache_size", not after.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:12e7d9ec023db4dd837f76006c87defc5a3e9388
User & Date: drh 2015-11-12 22:15:18
Context
2015-11-12
23:48
Update the SQLLOG logic so that to builds in accordance with the instructions in the header comment. check-in: ee6f2fee user: drh tags: trunk
22:15
Always parse the schema *before* running "PRAGMA cache_size", not after. check-in: 12e7d9ec user: drh tags: trunk
21:42
Add a space before each line of error output in the test scripts so that all errors can be conveniently located in logs by doing "grep '^ '". check-in: 9d532fb5 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pragma.c.

   731    731     ** number of pages in the cache.  If N is negative, then the
   732    732     ** number of pages is adjusted so that the cache uses -N kibibytes
   733    733     ** of memory.
   734    734     */
   735    735     case PragTyp_CACHE_SIZE: {
   736    736       assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
   737    737       if( !zRight ){
   738         -      if( sqlite3ReadSchema(pParse) ) goto pragma_out;
   739    738         returnSingleInt(v, "cache_size", pDb->pSchema->cache_size);
   740    739       }else{
   741    740         int size = sqlite3Atoi(zRight);
   742    741         pDb->pSchema->cache_size = size;
   743    742         sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size);
   744         -      if( sqlite3ReadSchema(pParse) ) goto pragma_out;
   745    743       }
   746    744       break;
   747    745     }
   748    746   
   749    747     /*
   750    748     **  PRAGMA [schema.]cache_spill
   751    749     **  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 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