SQLite

Check-in [890816c52d]
Login

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

Overview
Comment:Updates to e_vacuum.test so that it works when SQLITE_DEFAULT_AUTOVACUUM=1 is set.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 890816c52d688f01be9a8abd8b4c9375eed4de7e
User & Date: drh 2010-09-28 15:25:21.000
Context
2010-09-28
15:55
Disallow statements of the form "CREATE TEMP TABLE main.t1 ...". (check-in: dd1b34bab7 user: dan tags: trunk)
15:25
Updates to e_vacuum.test so that it works when SQLITE_DEFAULT_AUTOVACUUM=1 is set. (check-in: 890816c52d user: drh tags: trunk)
14:26
Fix several harmless compiler warnings. (check-in: 7be03ecc04 user: drh tags: trunk)
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to test/e_vacuum.test.
185
186
187
188
189
190
191
192

193
194
195
196
197
198
199

200
201
202
203
204
205
206
207

208
209
210
211
212
213
214
185
186
187
188
189
190
191

192
193
194
195
196
197
198

199
200
201
202
203
204
205
206

207
208
209
210
211
212
213
214







-
+






-
+







-
+







  execsql VACUUM
  execsql { PRAGMA page_size ; PRAGMA auto_vacuum }
} {2048 1}

# EVIDENCE-OF: R-38001-03952 VACUUM only works on the main database. It
# is not possible to VACUUM an attached database file.
forcedelete test.db2
create_db
create_db { PRAGMA auto_vacuum = NONE }
do_execsql_test e_vacuum-2.1.1 {
  ATTACH 'test.db2' AS aux;
  PRAGMA aux.page_size = 1024;
  CREATE TABLE aux.t3 AS SELECT * FROM t1;
  DELETE FROM t3;
} {}
do_test e_vacuum-2.1.2 { expr { ([file size test.db2] / 1024)>50 } } 1
set original_size [file size test.db2]

# Try everything we can think of to get the aux database vacuumed:
do_execsql_test e_vacuum-2.1.3 { VACUUM } {}
do_execsql_test e_vacuum-2.1.4 { VACUUM aux } {}
do_execsql_test e_vacuum-2.1.5 { VACUUM 'test.db2' } {}

# Despite our efforts, space in the aux database has not been reclaimed:
do_test e_vacuum-2.1.6 { expr { ([file size test.db2] / 1024)>50 } } 1
do_test e_vacuum-2.1.6 { expr {[file size test.db2]==$::original_size} } 1

# EVIDENCE-OF: R-17495-17419 The VACUUM command may change the ROWIDs of
# entries in any tables that do not have an explicit INTEGER PRIMARY
# KEY.
#
#   Tests e_vacuum-3.1.1 - 3.1.2 demonstrate that rowids can change when
#   a database is VACUUMed. Tests e_vacuum-3.1.3 - 3.1.4 show that adding