interplane.Get Omega
Read in your language

sqlite

[Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI.

Brought by drakestapleton

branch master Branches Tags History

sqlite / test / tkt-5d863f876e.test

55 lines · 1291 bytes Raw Blame History
1# 2011 January 15
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.
12#
13# This file implements tests to verify that ticket [5d863f876e] has been
14# fixed.
15#
16
17set testdir [file dirname $argv0]
18source $testdir/tester.tcl
19source $testdir/lock_common.tcl
20set ::testprefix tkt-5d863f876e
21if {![wal_is_capable]} {finish_test ; return }
22
23do_multiclient_test tn {
24 do_test $tn.1 {
25 sql1 {
26 CREATE TABLE t1(a, b);
27 CREATE INDEX i1 ON t1(a, b);
28 INSERT INTO t1 VALUES(1, 2);
29 INSERT INTO t1 VALUES(3, 4);
30 PRAGMA journal_mode = WAL;
31 VACUUM;
32 PRAGMA journal_mode = DELETE;
33 }
34 } {wal delete}
35
36 do_test $tn.2 {
37 sql2 { SELECT * FROM t1 }
38 } {1 2 3 4}
39
40 do_test $tn.3 {
41 sql1 {
42 INSERT INTO t1 VALUES(5, 6);
43 PRAGMA journal_mode = WAL;
44 VACUUM;
45 PRAGMA journal_mode = DELETE;
46 }
47 } {wal delete}
48
49 do_test $tn.2 {
50 sql2 { PRAGMA integrity_check }
51 } {ok}
52}
53
54
55finish_test