aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/sqlite/unix/sqlite-3.5.1/test/incrvacuum_ioerr.test
diff options
context:
space:
mode:
authordan miller2007-10-20 02:49:29 +0000
committerdan miller2007-10-20 02:49:29 +0000
commite36d23a85ebff914d74bb541558c2b6082b78edb (patch)
tree54b58fdf162e78af64055282a6035c8d2443389d /libraries/sqlite/unix/sqlite-3.5.1/test/incrvacuum_ioerr.test
parent* Fixed an issue whereby avatar chat distances were being calculated against ... (diff)
downloadopensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.zip
opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.gz
opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.bz2
opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.xz
sqlite source (unix build) added to libraries
Diffstat (limited to 'libraries/sqlite/unix/sqlite-3.5.1/test/incrvacuum_ioerr.test')
-rw-r--r--libraries/sqlite/unix/sqlite-3.5.1/test/incrvacuum_ioerr.test89
1 files changed, 89 insertions, 0 deletions
diff --git a/libraries/sqlite/unix/sqlite-3.5.1/test/incrvacuum_ioerr.test b/libraries/sqlite/unix/sqlite-3.5.1/test/incrvacuum_ioerr.test
new file mode 100644
index 0000000..9ee9e38
--- /dev/null
+++ b/libraries/sqlite/unix/sqlite-3.5.1/test/incrvacuum_ioerr.test
@@ -0,0 +1,89 @@
1# 2001 October 12
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. The
12# focus of this file is testing for correct handling of I/O errors
13# such as writes failing because the disk is full.
14#
15# The tests in this file use special facilities that are only
16# available in the SQLite test fixture.
17#
18# $Id: incrvacuum_ioerr.test,v 1.2 2007/05/04 18:30:41 drh Exp $
19
20set testdir [file dirname $argv0]
21source $testdir/tester.tcl
22
23# If this build of the library does not support auto-vacuum, omit this
24# whole file.
25ifcapable {!autovacuum} {
26 finish_test
27 return
28}
29
30do_ioerr_test incrvacuum-ioerr-1 -cksum 1 -sqlprep {
31 PRAGMA auto_vacuum = 'incremental';
32 CREATE TABLE abc(a);
33 INSERT INTO abc VALUES(randstr(1500,1500));
34} -sqlbody {
35 BEGIN;
36 CREATE TABLE abc2(a);
37 DELETE FROM abc;
38 PRAGMA incremental_vacuum;
39 COMMIT;
40}
41
42# do_ioerr_test incrvacuum-ioerr-3 -start 1 -cksum 1 -tclprep {
43# db eval {
44# PRAGMA auto_vacuum = 'full';
45# PRAGMA cache_size = 10;
46# BEGIN;
47# CREATE TABLE abc(a, UNIQUE(a));
48# }
49# for {set ii 0} {$ii < 25} {incr ii} {
50# db eval {INSERT INTO abc VALUES(randstr(1500,1500))}
51# }
52# db eval COMMIT
53# } -sqlbody {
54# BEGIN;
55# DELETE FROM abc WHERE (oid%3)==0;
56# INSERT INTO abc SELECT a || '1234567890' FROM abc WHERE oid%2;
57# CREATE INDEX abc_i ON abc(a);
58# DELETE FROM abc WHERE (oid%2)==0;
59# DROP INDEX abc_i;
60# COMMIT;
61# }
62
63
64do_ioerr_test incrvacuum-ioerr-2 -start 1 -cksum 1 -tclprep {
65 db eval {
66 PRAGMA auto_vacuum = 'full';
67 PRAGMA cache_size = 10;
68 BEGIN;
69 CREATE TABLE abc(a, UNIQUE(a));
70 }
71 for {set ii 0} {$ii < 25} {incr ii} {
72 db eval {INSERT INTO abc VALUES(randstr(1500,1500))}
73 }
74 db eval COMMIT
75} -sqlbody {
76 BEGIN;
77 PRAGMA incremental_vacuum;
78 DELETE FROM abc WHERE (oid%3)==0;
79 PRAGMA incremental_vacuum;
80 INSERT INTO abc SELECT a || '1234567890' FROM abc WHERE oid%2;
81 PRAGMA incremental_vacuum;
82 CREATE INDEX abc_i ON abc(a);
83 DELETE FROM abc WHERE (oid%2)==0;
84 PRAGMA incremental_vacuum;
85 DROP INDEX abc_i;
86 PRAGMA incremental_vacuum;
87 COMMIT;
88}
89finish_test