/ Check-in [93d92a0a]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Merge the VACUUM simplification from trunk.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | vacuum-into
Files: files | file ages | folders
SHA3-256: 93d92a0a5d21a1856316c0205ecaa253691b6e5349b552d43027005676d14820
User & Date: drh 2018-12-07 20:40:12
Context
2018-12-07
23:48
Do not allow VACUUM INTO into a file that already exists. check-in: 92f70e0f user: drh tags: vacuum-into
20:40
Merge the VACUUM simplification from trunk. check-in: 93d92a0a user: drh tags: vacuum-into
20:26
Remove a line of code from VACUUM that is no longer needed, due to the change that allows ATTACH to run within a transaction. check-in: a92c398f user: drh tags: trunk
17:28
Prototype implementation for the VACUUM INTO command. check-in: 036e3320 user: drh tags: vacuum-into
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/vacuum.c.

   196    196     nDb = db->nDb;
   197    197     rc = execSqlF(db, pzErrMsg, "ATTACH %Q AS vacuum_db", zOut ? zOut : "");
   198    198     if( rc!=SQLITE_OK ) goto end_of_vacuum;
   199    199     assert( (db->nDb-1)==nDb );
   200    200     pDb = &db->aDb[nDb];
   201    201     assert( strcmp(pDb->zDbSName,"vacuum_db")==0 );
   202    202     pTemp = pDb->pBt;
   203         -
   204         -  /* The call to execSql() to attach the temp database has left the file
   205         -  ** locked (as there was more than one active statement when the transaction
   206         -  ** to read the schema was concluded. Unlock it here so that this doesn't
   207         -  ** cause problems for the call to BtreeSetPageSize() below.  */
   208         -  sqlite3BtreeCommit(pTemp);
   209         -
   210    203     nRes = sqlite3BtreeGetOptimalReserve(pMain);
   211    204   
   212    205     /* A VACUUM cannot change the pagesize of an encrypted database. */
   213    206   #ifdef SQLITE_HAS_CODEC
   214    207     if( db->nextPagesize ){
   215    208       extern void sqlite3CodecGetKey(sqlite3*, int, void**, int*);
   216    209       int nKey;