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

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

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months 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
« no previous file with comments | « third_party/sqlite/src/test/uri.test ('k') | third_party/sqlite/src/test/view.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 #***********************************************************************
11 # This file implements regression tests for SQLite library. The 11 # This file implements regression tests for SQLite library. The
12 # focus of this file is testing the VACUUM statement. 12 # focus of this file is testing the VACUUM statement.
13 # 13 #
14 # $Id: vacuum2.test,v 1.10 2009/02/18 20:31:18 drh Exp $ 14 # $Id: vacuum2.test,v 1.10 2009/02/18 20:31:18 drh Exp $
15 15
16 set testdir [file dirname $argv0] 16 set testdir [file dirname $argv0]
17 source $testdir/tester.tcl 17 source $testdir/tester.tcl
18 set testprefix vacuum2
18 19
19 # Do not use a codec for tests in this file, as the database file is 20 # Do not use a codec for tests in this file, as the database file is
20 # manipulated directly using tcl scripts (using the [hexio_write] command). 21 # manipulated directly using tcl scripts (using the [hexio_write] command).
21 # 22 #
22 do_not_use_codec 23 do_not_use_codec
23 24
24 # If the VACUUM statement is disabled in the current build, skip all 25 # If the VACUUM statement is disabled in the current build, skip all
25 # the tests in this file. 26 # the tests in this file.
26 # 27 #
27 ifcapable {!vacuum||!autoinc} { 28 ifcapable {!vacuum||!autoinc} {
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 do_test vacuum2-5.4 { 221 do_test vacuum2-5.4 {
221 set res "" 222 set res ""
222 set res2 "" 223 set res2 ""
223 db eval {SELECT a, b FROM t1 WHERE a<=10} { 224 db eval {SELECT a, b FROM t1 WHERE a<=10} {
224 if {$a==6} { set res [catchsql VACUUM] } 225 if {$a==6} { set res [catchsql VACUUM] }
225 lappend res2 $a 226 lappend res2 $a
226 } 227 }
227 lappend res2 $res 228 lappend res2 $res
228 } {1 2 3 4 5 6 7 8 9 10 {1 {cannot VACUUM - SQL statements in progress}}} 229 } {1 2 3 4 5 6 7 8 9 10 {1 {cannot VACUUM - SQL statements in progress}}}
229 230
231 #-------------------------------------------------------------------------
232 # Check that if the definition of a collation sequence is changed and
233 # VACUUM run, records are store in the (new) correct order following the
234 # VACUUM. Even if the modified collation is attached to a PK of a WITHOUT
235 # ROWID table.
236
237 proc cmp {lhs rhs} { string compare $lhs $rhs }
238 db collate cmp cmp
239 do_execsql_test 6.0 {
240 CREATE TABLE t6(x PRIMARY KEY COLLATE cmp, y) WITHOUT ROWID;
241 CREATE INDEX t6y ON t6(y);
242 INSERT INTO t6 VALUES('i', 'one');
243 INSERT INTO t6 VALUES('ii', 'one');
244 INSERT INTO t6 VALUES('iii', 'one');
245 }
246 integrity_check 6.1
247 proc cmp {lhs rhs} { string compare $rhs $lhs }
248 do_execsql_test 6.2 VACUUM
249 integrity_check 6.3
230 250
231 finish_test 251 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/uri.test ('k') | third_party/sqlite/src/test/view.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698