/ Check-in [a92c398f]
Login

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

Overview
Comment:Remove a line of code from VACUUM that is no longer needed, due to the change that allows ATTACH to run within a transaction.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:a92c398fc5df142ff1459c1be4a6832f2219bc7fabe5789535be3bbd41a4269b
User & Date: drh 2018-12-07 20:26:29
Context
2018-12-08
20:30
Do not use a partial index as a table scan in an IN operator. Fix for ticket [1d958d90596593a77420e59]. check-in: 15bc915d user: drh tags: trunk
2018-12-07
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
16:32
Fix the sqlite3_normalized_sql() interface so that it renders double-quoted string literals as "?". check-in: 0d8e1504 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vacuum.c.

191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
  nDb = db->nDb;
  rc = execSql(db, pzErrMsg, "ATTACH''AS vacuum_db");
  if( rc!=SQLITE_OK ) goto end_of_vacuum;
  assert( (db->nDb-1)==nDb );
  pDb = &db->aDb[nDb];
  assert( strcmp(pDb->zDbSName,"vacuum_db")==0 );
  pTemp = pDb->pBt;

  /* The call to execSql() to attach the temp database has left the file
  ** locked (as there was more than one active statement when the transaction
  ** to read the schema was concluded. Unlock it here so that this doesn't
  ** cause problems for the call to BtreeSetPageSize() below.  */
  sqlite3BtreeCommit(pTemp);

  nRes = sqlite3BtreeGetOptimalReserve(pMain);

  /* A VACUUM cannot change the pagesize of an encrypted database. */
#ifdef SQLITE_HAS_CODEC
  if( db->nextPagesize ){
    extern void sqlite3CodecGetKey(sqlite3*, int, void**, int*);
    int nKey;







<
<
<
<
<
<
<







191
192
193
194
195
196
197







198
199
200
201
202
203
204
  nDb = db->nDb;
  rc = execSql(db, pzErrMsg, "ATTACH''AS vacuum_db");
  if( rc!=SQLITE_OK ) goto end_of_vacuum;
  assert( (db->nDb-1)==nDb );
  pDb = &db->aDb[nDb];
  assert( strcmp(pDb->zDbSName,"vacuum_db")==0 );
  pTemp = pDb->pBt;







  nRes = sqlite3BtreeGetOptimalReserve(pMain);

  /* A VACUUM cannot change the pagesize of an encrypted database. */
#ifdef SQLITE_HAS_CODEC
  if( db->nextPagesize ){
    extern void sqlite3CodecGetKey(sqlite3*, int, void**, int*);
    int nKey;