1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/persistentstorage/sqlite3api/TEST/TclScript/ioerr3.test Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,42 @@
1.4 +# 2007 December 19
1.5 +#
1.6 +# The author disclaims copyright to this source code. In place of
1.7 +# a legal notice, here is a blessing:
1.8 +#
1.9 +# May you do good and not evil.
1.10 +# May you find forgiveness for yourself and forgive others.
1.11 +# May you share freely, never taking more than you give.
1.12 +#
1.13 +#***********************************************************************
1.14 +# This file implements regression tests for SQLite library. The
1.15 +# focus of this file is testing for correct handling of I/O errors
1.16 +# in conjunction with very small soft-heap-limit values.
1.17 +#
1.18 +# $Id: ioerr3.test,v 1.2 2008/01/19 23:50:26 drh Exp $
1.19 +
1.20 +set testdir [file dirname $argv0]
1.21 +source $testdir/tester.tcl
1.22 +
1.23 +do_ioerr_test ioerr3-1 -sqlprep {
1.24 + CREATE TABLE t1(id INTEGER, name TEXT);
1.25 +} -tclbody {
1.26 + sqlite3_soft_heap_limit 8192
1.27 + db cache size 0
1.28 + execsql BEGIN
1.29 + for {set ii 0} {$ii < 100} {incr ii} {
1.30 + execsql {
1.31 + INSERT INTO t1(id, name) VALUES (1,
1.32 +'A1234567890B1234567890C1234567890D1234567890E1234567890F1234567890G1234567890H1234567890I1234567890J1234567890K1234567890L1234567890M1234567890N1234567890O1234567890P1234567890Q1234567890R1234567890'
1.33 + );
1.34 + }
1.35 + }
1.36 + execsql COMMIT
1.37 +}
1.38 +
1.39 +do_ioerr_test ioerr3-2 -sqlbody {
1.40 + CREATE TEMP TABLE t1(x,y);
1.41 +}
1.42 +
1.43 +sqlite3_soft_heap_limit 0
1.44 +
1.45 +finish_test