/ Check-in [7d0b881a]
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:Fix an incompatibility with OMIT_VIRTUALTABLE in e_vacuum.test.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7d0b881a6294b7f13069b2e4b69c0c0d46606505
User & Date: dan 2010-09-28 14:11:26
Context
2010-09-28
14:26
Fix several harmless compiler warnings. check-in: 7be03ecc user: drh tags: trunk
14:11
Fix an incompatibility with OMIT_VIRTUALTABLE in e_vacuum.test. check-in: 7d0b881a user: dan tags: trunk
13:12
Updates to the sqlite3_get_table() documentation. check-in: c7aa238c user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/e_vacuum.test.

118
119
120
121
122
123
124

125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144

145
146
147
148
149
150
151
#
#   e_vacuum-1.2.1 - Perform many INSERT, UPDATE and DELETE ops on table t1.
#   e_vacuum-1.2.2 - Verify that t1 and its indexes are now quite fragmented.
#   e_vacuum-1.2.3 - Run VACUUM.
#   e_vacuum-1.2.4 - Verify that t1 and its indexes are now much 
#                    less fragmented.
#

create_db 
register_dbstat_vtab db
do_execsql_test e_vacuum-1.2.1 {
  DELETE FROM t1 WHERE a%2;
  INSERT INTO t1 SELECT b, a FROM t2 WHERE a%2;
  UPDATE t1 SET b=randomblob(600) WHERE (a%2)==0;
} {}

do_test e_vacuum-1.2.2.1 { expr [fragment_count t1]>100 } 1
do_test e_vacuum-1.2.2.2 { expr [fragment_count sqlite_autoindex_t1_1]>100 } 1
do_test e_vacuum-1.2.2.3 { expr [fragment_count sqlite_autoindex_t1_2]>100 } 1

do_execsql_test e_vacuum-1.2.3 { VACUUM } {}

# In practice, the tables and indexes each end up stored as two fragments -
# one containing the root page and another containing all other pages.
#
do_test e_vacuum-1.2.4.1 { fragment_count t1 }                    2
do_test e_vacuum-1.2.4.2 { fragment_count sqlite_autoindex_t1_1 } 2
do_test e_vacuum-1.2.4.3 { fragment_count sqlite_autoindex_t1_2 } 2


# EVIDENCE-OF: R-20474-44465 Normally, the database page_size and
# whether or not the database supports auto_vacuum must be configured
# before the database file is actually created.
#
do_test e_vacuum-1.3.1.1 {
  create_db "PRAGMA page_size = 1024 ; PRAGMA auto_vacuum = FULL"







>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>







118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#
#   e_vacuum-1.2.1 - Perform many INSERT, UPDATE and DELETE ops on table t1.
#   e_vacuum-1.2.2 - Verify that t1 and its indexes are now quite fragmented.
#   e_vacuum-1.2.3 - Run VACUUM.
#   e_vacuum-1.2.4 - Verify that t1 and its indexes are now much 
#                    less fragmented.
#
ifcapable vtab {
  create_db 
  register_dbstat_vtab db
  do_execsql_test e_vacuum-1.2.1 {
    DELETE FROM t1 WHERE a%2;
    INSERT INTO t1 SELECT b, a FROM t2 WHERE a%2;
    UPDATE t1 SET b=randomblob(600) WHERE (a%2)==0;
  } {}
  
  do_test e_vacuum-1.2.2.1 { expr [fragment_count t1]>100 } 1
  do_test e_vacuum-1.2.2.2 { expr [fragment_count sqlite_autoindex_t1_1]>100 } 1
  do_test e_vacuum-1.2.2.3 { expr [fragment_count sqlite_autoindex_t1_2]>100 } 1
  
  do_execsql_test e_vacuum-1.2.3 { VACUUM } {}
  
  # In practice, the tables and indexes each end up stored as two fragments -
  # one containing the root page and another containing all other pages.
  #
  do_test e_vacuum-1.2.4.1 { fragment_count t1 }                    2
  do_test e_vacuum-1.2.4.2 { fragment_count sqlite_autoindex_t1_1 } 2
  do_test e_vacuum-1.2.4.3 { fragment_count sqlite_autoindex_t1_2 } 2
}

# EVIDENCE-OF: R-20474-44465 Normally, the database page_size and
# whether or not the database supports auto_vacuum must be configured
# before the database file is actually created.
#
do_test e_vacuum-1.3.1.1 {
  create_db "PRAGMA page_size = 1024 ; PRAGMA auto_vacuum = FULL"