/ Check-in [9daf4e7d]
Login

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

Overview
Comment:When TEMP files are in memory, also put the massive TEMP file used by the VACUUM command in memory.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9daf4e7d07769f25b3a579d80e7fada4e52344b1
User & Date: drh 2010-03-02 23:34:55
References
2010-03-03
00:02
When TEMP files are in memory, also put the massive TEMP file used by the VACUUM command in memory. This is a cherry-pick merge of [9daf4e7d07] check-in: e5342234 user: drh tags: branch-3.6.22
Context
2010-03-03
14:23
Modify the command line tool to disable all mutexes. The command line tool is single-threaded. check-in: 00e56790 user: dan tags: trunk
2010-03-02
23:34
When TEMP files are in memory, also put the massive TEMP file used by the VACUUM command in memory. check-in: 9daf4e7d user: drh tags: trunk
2010-02-26
16:37
Rename the sqlite_compile_option_*() SQL functions to sqlite_compileoption_*() for consistency with the C/C++ interface. check-in: dd4962aa user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/pcache.c.

   185    185   ** are no outstanding page references when this function is called.
   186    186   */
   187    187   void sqlite3PcacheSetPageSize(PCache *pCache, int szPage){
   188    188     assert( pCache->nRef==0 && pCache->pDirty==0 );
   189    189     if( pCache->pCache ){
   190    190       sqlite3GlobalConfig.pcache.xDestroy(pCache->pCache);
   191    191       pCache->pCache = 0;
          192  +    pCache->pPage1 = 0;
   192    193     }
   193    194     pCache->szPage = szPage;
   194    195   }
   195    196   
   196    197   /*
   197    198   ** Try to obtain a page from the cache.
   198    199   */

Changes to src/vacuum.c.

   134    134     ** (Later:) I tried setting "PRAGMA vacuum_db.journal_mode=OFF" but
   135    135     ** that actually made the VACUUM run slower.  Very little journalling
   136    136     ** actually occurs when doing a vacuum since the vacuum_db is initially
   137    137     ** empty.  Only the journal header is written.  Apparently it takes more
   138    138     ** time to parse and run the PRAGMA to turn journalling off than it does
   139    139     ** to write the journal header file.
   140    140     */
   141         -  zSql = "ATTACH '' AS vacuum_db;";
          141  +  if( sqlite3TempInMemory(db) ){
          142  +    zSql = "ATTACH ':memory:' AS vacuum_db;";
          143  +  }else{
          144  +    zSql = "ATTACH '' AS vacuum_db;";
          145  +  }
   142    146     rc = execSql(db, pzErrMsg, zSql);
   143    147     if( rc!=SQLITE_OK ) goto end_of_vacuum;
   144    148     pDb = &db->aDb[db->nDb-1];
   145    149     assert( strcmp(db->aDb[db->nDb-1].zName,"vacuum_db")==0 );
   146    150     pTemp = db->aDb[db->nDb-1].pBt;
   147    151   
   148    152     /* The call to execSql() to attach the temp database has left the file