diff options
author | dan miller | 2007-10-20 02:49:29 +0000 |
---|---|---|
committer | dan miller | 2007-10-20 02:49:29 +0000 |
commit | e36d23a85ebff914d74bb541558c2b6082b78edb (patch) | |
tree | 54b58fdf162e78af64055282a6035c8d2443389d /libraries/sqlite/unix/sqlite-3.5.1/test/softheap1.test | |
parent | * Fixed an issue whereby avatar chat distances were being calculated against ... (diff) | |
download | opensim-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/softheap1.test')
-rw-r--r-- | libraries/sqlite/unix/sqlite-3.5.1/test/softheap1.test | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/libraries/sqlite/unix/sqlite-3.5.1/test/softheap1.test b/libraries/sqlite/unix/sqlite-3.5.1/test/softheap1.test new file mode 100644 index 0000000..62b9251 --- /dev/null +++ b/libraries/sqlite/unix/sqlite-3.5.1/test/softheap1.test | |||
@@ -0,0 +1,47 @@ | |||
1 | # 2007 Aug 10 | ||
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 | # This test script reproduces the problem reported by ticket #2565, | ||
13 | # A database corruption bug that occurs in auto_vacuum mode when | ||
14 | # the soft_heap_limit is set low enough to be triggered. | ||
15 | # | ||
16 | # $Id: softheap1.test,v 1.3 2007/09/12 17:01:45 danielk1977 Exp $ | ||
17 | |||
18 | |||
19 | set testdir [file dirname $argv0] | ||
20 | source $testdir/tester.tcl | ||
21 | |||
22 | ifcapable !integrityck { | ||
23 | finish_test | ||
24 | return | ||
25 | } | ||
26 | |||
27 | sqlite3_soft_heap_limit 5000 | ||
28 | do_test softheap1-1.1 { | ||
29 | execsql { | ||
30 | PRAGMA auto_vacuum=1; | ||
31 | CREATE TABLE t1(x); | ||
32 | INSERT INTO t1 VALUES(hex(randomblob(1000))); | ||
33 | BEGIN; | ||
34 | } | ||
35 | execsql { | ||
36 | CREATE TABLE t2 AS SELECT * FROM t1; | ||
37 | } | ||
38 | execsql { | ||
39 | ROLLBACK; | ||
40 | } | ||
41 | execsql { | ||
42 | PRAGMA integrity_check; | ||
43 | } | ||
44 | } {ok} | ||
45 | sqlite3_soft_heap_limit $soft_limit | ||
46 | |||
47 | finish_test | ||