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-5e10420e8d.test

50 lines · 1096 bytes Raw Blame History
1# 2010 August 23
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#
12
13set testdir [file dirname $argv0]
14source $testdir/tester.tcl
15
16do_execsql_test tkt-5e10420e8d.1 {
17 PRAGMA page_size = 1024;
18 PRAGMA auto_vacuum = incremental;
19
20 CREATE TABLE t1(x);
21 CREATE TABLE t2(x);
22 CREATE TABLE t3(x);
23} {}
24
25do_execsql_test tkt-5e10420e8d.2 {
26 INSERT INTO t3 VALUES(randomblob(500 + 1024*248));
27 INSERT INTO t1 VALUES(randomblob(1500));
28 INSERT INTO t2 VALUES(randomblob(500 + 1024*248));
29
30 DELETE FROM t3;
31 DELETE FROM t2;
32 DELETE FROM t1;
33} {}
34
35do_execsql_test tkt-5e10420e8d.3 {
36 PRAGMA incremental_vacuum(248)
37} {}
38
39do_execsql_test tkt-5e10420e8d.4 {
40 PRAGMA incremental_vacuum(1)
41} {}
42
43db close
44sqlite3 db test.db
45
46do_execsql_test tkt-5e10420e8d.5 {
47 PRAGMA integrity_check;
48} {ok}
49
50finish_test