SQLite

Check-in [cdb7efd01e]
Login

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

Overview
Comment:Merge the VACCUM cache_size adjustment from trunk.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | apple-osx
Files: files | file ages | folders
SHA1: cdb7efd01ed7a8f11681b277098bb3eb12ca39d2
User & Date: drh 2016-07-25 22:46:06.502
Context
2016-07-26
04:23
Make sure affinity is applied correctly on lower-bound range constraints in the min() optimization. Fix for ticket [a0bac8b3c3d1bb]. (check-in: 0e9f534fef user: drh tags: apple-osx)
2016-07-25
22:46
Merge the VACCUM cache_size adjustment from trunk. (check-in: cdb7efd01e user: drh tags: apple-osx)
22:40
In the VACUUM command, set the cache_size of the transient vacuum_db database to be the same as the database being vacuumed. (check-in: b78d99548a user: drh tags: trunk)
18:50
Add the experimental SQLITE_VACUUM_CACHE_SIZE macro. (check-in: 68ecd8e042 user: drh tags: apple-osx)
Changes
Unified Diff Ignore Whitespace Patch
Changes to ext/fts5/test/fts5simple.test.
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
# Test that character 0x1A is allowed in fts5 barewords.
#
do_test 11.0 {
  execsql "CREATE VIRTUAL TABLE t4 USING fts5(x, tokenize=\"ascii tokenchars '\x1A'\")"
  execsql "
    INSERT INTO t4 VALUES('a b c \x1A');
    INSERT INTO t4 VALUES('a b c d\x1A');
    INSERT INTO t4 VALUES('a b c \x1Ad');
    INSERT INTO t4 VALUES('a b c d');
  "
} {}

do_test 11.1 {
  execsql "SELECT rowid FROM t4('\x1A')"
} {1}







|







261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
# Test that character 0x1A is allowed in fts5 barewords.
#
do_test 11.0 {
  execsql "CREATE VIRTUAL TABLE t4 USING fts5(x, tokenize=\"ascii tokenchars '\x1A'\")"
  execsql "
    INSERT INTO t4 VALUES('a b c \x1A');
    INSERT INTO t4 VALUES('a b c d\x1A');
    INSERT INTO t4 VALUES('a b c \x1Ag');
    INSERT INTO t4 VALUES('a b c d');
  "
} {}

do_test 11.1 {
  execsql "SELECT rowid FROM t4('\x1A')"
} {1}
Changes to src/vacuum.c.
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
    int nKey;
    char *zKey;
    sqlite3CodecGetKey(db, 0, (void**)&zKey, &nKey);
    if( nKey ) db->nextPagesize = 0;
  }
#endif

#if defined(SQLITE_VACUUM_CACHE_SIZE) && SQLITE_VACUUM_CACHE_SIZE+0>=1
  sqlite3BtreeSetCacheSize(pTemp, SQLITE_VACUUM_CACHE_SIZE);
#endif
  rc = execSql(db, pzErrMsg, "PRAGMA vacuum_db.synchronous=OFF");
  if( rc!=SQLITE_OK ) goto end_of_vacuum;

  /* Begin a transaction and take an exclusive lock on the main database
  ** file. This is done before the sqlite3BtreeGetPageSize(pMain) call below,
  ** to ensure that we do not try to change the page-size on a WAL database.
  */







<
|
<







193
194
195
196
197
198
199

200

201
202
203
204
205
206
207
    int nKey;
    char *zKey;
    sqlite3CodecGetKey(db, 0, (void**)&zKey, &nKey);
    if( nKey ) db->nextPagesize = 0;
  }
#endif


  sqlite3BtreeSetCacheSize(pTemp, db->aDb[0].pSchema->cache_size);

  rc = execSql(db, pzErrMsg, "PRAGMA vacuum_db.synchronous=OFF");
  if( rc!=SQLITE_OK ) goto end_of_vacuum;

  /* Begin a transaction and take an exclusive lock on the main database
  ** file. This is done before the sqlite3BtreeGetPageSize(pMain) call below,
  ** to ensure that we do not try to change the page-size on a WAL database.
  */