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

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

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 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/wal6.test ('k') | third_party/sqlite/src/test/walbak.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 # 2012 February 28 1 # 2012 February 28
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 operation of the library in 12 # focus of this file is testing the operation of the library in
13 # "PRAGMA journal_mode=WAL" mode. 13 # "PRAGMA journal_mode=WAL" mode.
14 # 14 #
15 # Specifically, it tests the case where a connection opens an empty 15 # Specifically, it tests the case where a connection opens an empty
16 # file. Then, another connection opens the same file and initializes 16 # file. Then, another connection opens the same file and initializes
17 # the connection as a WAL database. Following this, the first connection 17 # the connection as a WAL database. Following this, the first connection
18 # executes a "PRAGMA page_size = XXX" command to set its expected page 18 # executes a "PRAGMA page_size = XXX" command to set its expected page
19 # size, and then queries the database. 19 # size, and then queries the database.
20 # 20 #
21 # This is an unusual case, as normally SQLite is able to glean the page 21 # This is an unusual case, as normally SQLite is able to glean the page
22 # size from the database file as soon as it is opened (even before the 22 # size from the database file as soon as it is opened (even before the
23 # first read transaction is executed), and the "PRAGMA page_size = XXX" 23 # first read transaction is executed), and the "PRAGMA page_size = XXX"
24 # is a no-op. 24 # is a no-op.
25 # 25 #
26 set testdir [file dirname $argv0] 26 set testdir [file dirname $argv0]
27 source $testdir/tester.tcl 27 source $testdir/tester.tcl
28 set ::testprefix wal8 28 set ::testprefix wal8
29 ifcapable !wal {finish_test ; return } 29 ifcapable !wal {finish_test ; return }
30 do_not_use_codec
30 31
31 db close 32 db close
32 forcedelete test.db test.db-wal 33 forcedelete test.db test.db-wal
33 34
34 sqlite3 db test.db 35 sqlite3 db test.db
35 sqlite3 db2 test.db 36 sqlite3 db2 test.db
36 37
37 do_test 1.0 { 38 do_test 1.0 {
38 execsql { 39 execsql {
39 PRAGMA journal_mode = wal; 40 PRAGMA journal_mode = wal;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 INSERT INTO t1 VALUES(1, 2); 82 INSERT INTO t1 VALUES(1, 2);
82 } db2 83 } db2
83 } {wal} 84 } {wal}
84 85
85 do_execsql_test 3.1 { 86 do_execsql_test 3.1 {
86 PRAGMA page_size = 4096; 87 PRAGMA page_size = 4096;
87 SELECT name FROM sqlite_master; 88 SELECT name FROM sqlite_master;
88 } {t1} 89 } {t1}
89 90
90 finish_test 91 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/wal6.test ('k') | third_party/sqlite/src/test/walbak.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698