Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: third_party/sqlite/src/test/vacuum2.test

Issue 5626002: Update sqlite to 3.7.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/third_party/sqlite/src
Patch Set: Remove misc change. Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/sqlite/src/test/vacuum.test ('k') | third_party/sqlite/src/test/vacuum4.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2005 February 15 1 # 2005 February 15
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #*********************************************************************** 10 #***********************************************************************
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 } {ok} 175 } {ok}
176 do_test vacuum2-4.7 { 176 do_test vacuum2-4.7 {
177 db close 177 db close
178 sqlite3 db test.db 178 sqlite3 db test.db
179 execsql { 179 execsql {
180 pragma auto_vacuum; 180 pragma auto_vacuum;
181 } 181 }
182 } {2} 182 } {2}
183 } 183 }
184 184
185
186 #-------------------------------------------------------------------------
187 # The following block of tests verify the behaviour of the library when
188 # a database is VACUUMed when there are one or more unfinalized SQL
189 # statements reading the same database using the same db handle.
190 #
191 db close
192 forcedelete test.db
193 sqlite3 db test.db
194 do_execsql_test vacuum2-5.1 {
195 CREATE TABLE t1(a PRIMARY KEY, b UNIQUE);
196 INSERT INTO t1 VALUES(1, randomblob(500));
197 INSERT INTO t1 SELECT a+1, randomblob(500) FROM t1; -- 2
198 INSERT INTO t1 SELECT a+2, randomblob(500) FROM t1; -- 4
199 INSERT INTO t1 SELECT a+4, randomblob(500) FROM t1; -- 8
200 INSERT INTO t1 SELECT a+8, randomblob(500) FROM t1; -- 16
201 } {}
202
203 do_test vacuum2-5.2 {
204 list [catch {
205 db eval {SELECT a, b FROM t1} { if {$a == 8} { execsql VACUUM } }
206 } msg] $msg
207 } {1 {cannot VACUUM - SQL statements in progress}}
208
209 do_test vacuum2-5.3 {
210 list [catch {
211 db eval {SELECT 1, 2, 3} { execsql VACUUM }
212 } msg] $msg
213 } {1 {cannot VACUUM - SQL statements in progress}}
214
215 do_test vacuum2-5.4 {
216 set res ""
217 set res2 ""
218 db eval {SELECT a, b FROM t1 WHERE a<=10} {
219 if {$a==6} { set res [catchsql VACUUM] }
220 lappend res2 $a
221 }
222 lappend res2 $res
223 } {1 2 3 4 5 6 7 8 9 10 {1 {cannot VACUUM - SQL statements in progress}}}
224
225
185 finish_test 226 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/vacuum.test ('k') | third_party/sqlite/src/test/vacuum4.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698