3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
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.
10 #***********************************************************************
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.
17 # $Id: shortread1.test,v 1.1 2007/09/14 01:48:12 drh Exp $
20 set testdir [file dirname $argv0]
21 source $testdir/tester.tcl
23 do_test shortread1-1.1 {
25 CREATE TABLE t1(a TEXT);
27 INSERT INTO t1 VALUES(hex(randomblob(5000)));
28 INSERT INTO t1 VALUES(hex(randomblob(100)));
29 PRAGMA freelist_count;
32 do_test shortread1-1.2 {
34 DELETE FROM t1 WHERE rowid=1;
35 PRAGMA freelist_count;
38 do_test shortread1-1.3 {
39 sqlite3_release_memory [expr {1024*9}]
41 INSERT INTO t1 VALUES(hex(randomblob(5000)));
42 PRAGMA freelist_count;
45 do_test shortread1-1.4 {
48 SELECT count(*) FROM t1;