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/shortread1.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/shortread1.test')
-rw-r--r-- | libraries/sqlite/unix/sqlite-3.5.1/test/shortread1.test | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/libraries/sqlite/unix/sqlite-3.5.1/test/shortread1.test b/libraries/sqlite/unix/sqlite-3.5.1/test/shortread1.test new file mode 100644 index 0000000..647f2ff --- /dev/null +++ b/libraries/sqlite/unix/sqlite-3.5.1/test/shortread1.test | |||
@@ -0,0 +1,52 @@ | |||
1 | # 2007 Sep 13 | ||
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 file attempts to duplicate an error scenario seen on a | ||
13 | # customer system using version 3.2.2. The problem appears to | ||
14 | # have been fixed (perhaps by accident) with check-in [3503]. | ||
15 | # These tests will prevent an accidental recurrance. | ||
16 | # | ||
17 | # $Id: shortread1.test,v 1.1 2007/09/14 01:48:12 drh Exp $ | ||
18 | # | ||
19 | |||
20 | set testdir [file dirname $argv0] | ||
21 | source $testdir/tester.tcl | ||
22 | |||
23 | do_test shortread1-1.1 { | ||
24 | execsql { | ||
25 | CREATE TABLE t1(a TEXT); | ||
26 | BEGIN; | ||
27 | INSERT INTO t1 VALUES(hex(randomblob(5000))); | ||
28 | INSERT INTO t1 VALUES(hex(randomblob(100))); | ||
29 | PRAGMA freelist_count; | ||
30 | } | ||
31 | } {0} | ||
32 | do_test shortread1-1.2 { | ||
33 | execsql { | ||
34 | DELETE FROM t1 WHERE rowid=1; | ||
35 | PRAGMA freelist_count; | ||
36 | } | ||
37 | } {11} | ||
38 | do_test shortread1-1.3 { | ||
39 | sqlite3_release_memory [expr {1024*9}] | ||
40 | execsql { | ||
41 | INSERT INTO t1 VALUES(hex(randomblob(5000))); | ||
42 | PRAGMA freelist_count; | ||
43 | } | ||
44 | } {0} | ||
45 | do_test shortread1-1.4 { | ||
46 | execsql { | ||
47 | COMMIT; | ||
48 | SELECT count(*) FROM t1; | ||
49 | } | ||
50 | } {2} | ||
51 | |||
52 | finish_test | ||