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

Side by Side Diff: third_party/sqlite/src/test/tkt-2d1a5c67d.test

Issue 6990047: Import SQLite 3.7.6.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 # 2011 May 19
2 #
3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
5 #
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
9 #
10 #***********************************************************************
11 # This file implements regression tests for SQLite library. Specifically,
12 # it tests that ticket [2d1a5c67dfc2363e44f29d9bbd57f7331851390a] has
13 # been resolved.
14 #
15 #
16 #
17
18 set testdir [file dirname $argv0]
19 source $testdir/tester.tcl
20
21 ifcapable !wal {finish_test; return}
22
23 for {set ii 1} {$ii<=10} {incr ii} {
24 do_test tkt-2d1a5c67d.1.$ii {
25 db close
26 forcedelete test.db test.db-wal
27 sqlite3 db test.db
28 db eval "PRAGMA cache_size=$::ii"
29 db eval {
30 PRAGMA journal_mode=WAL;
31 CREATE TABLE t1(a,b);
32 CREATE INDEX t1b ON t1(b);
33 CREATE TABLE t2(x,y UNIQUE);
34 INSERT INTO t2 VALUES(3,4);
35 BEGIN;
36 INSERT INTO t1(a,b) VALUES(1,2);
37 SELECT 'A', * FROM t2 WHERE y=4;
38 SELECT 'B', * FROM t1;
39 COMMIT;
40 SELECT 'C', * FROM t1;
41 }
42 } {wal A 3 4 B 1 2 C 1 2}
43 }
44
45 db close
46 forcedelete test.db test.db-wal
47 sqlite3 db test.db
48 register_wholenumber_module db
49 db eval {
50 PRAGMA journal_mode=WAL;
51 CREATE TABLE t1(a,b);
52 CREATE INDEX t1b ON t1(b);
53 CREATE TABLE t2(x,y);
54 CREATE VIRTUAL TABLE nums USING wholenumber;
55 INSERT INTO t2 SELECT value, randomblob(1000) FROM nums
56 WHERE value BETWEEN 1 AND 1000;
57 }
58
59 for {set ii 1} {$ii<=10} {incr ii} {
60 do_test tkt-2d1a5c67d.2.$ii {
61 db eval "PRAGMA cache_size=$::ii"
62 db eval {
63 DELETE FROM t1;
64 BEGIN;
65 INSERT INTO t1(a,b) VALUES(1,2);
66 SELECT sum(length(y)) FROM t2;
67 COMMIT;
68 SELECT * FROM t1;
69 }
70 } {1000000 1 2}
71 }
72
73 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/tkt-26ff0c2d1e.test ('k') | third_party/sqlite/src/test/tkt-31338dca7e.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698