Remove code for calling the SQL function randstr() with 0 or 1 argument, as it is registered with sqlite as requiring exactly 2. Also test io errors in sqlite3_release_memory(). (CVS 4365)
FossilOrigin-Name: 5842f68c1ba838f24e9ba02c818d308540d591a4
This commit is contained in:
+22
-1
@@ -15,7 +15,7 @@
|
||||
# The tests in this file use special facilities that are only
|
||||
# available in the SQLite test fixture.
|
||||
#
|
||||
# $Id: ioerr.test,v 1.31 2007/03/17 10:26:59 danielk1977 Exp $
|
||||
# $Id: ioerr.test,v 1.32 2007/09/01 17:00:13 danielk1977 Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@@ -266,4 +266,25 @@ do_ioerr_test ioerr-11 -erc 1 -sqlprep {
|
||||
UPDATE A SET Id = 2, Name = 'Name2' WHERE Id = 1;
|
||||
}
|
||||
|
||||
# Test that an io error encountered in a sync() caused by a call to
|
||||
# sqlite3_release_memory() is handled Ok. Only try this if
|
||||
# memory-management is enabled.
|
||||
#
|
||||
ifcapable memorymanage {
|
||||
do_ioerr_test memmanage-ioerr1 -sqlprep {
|
||||
BEGIN;
|
||||
CREATE TABLE t1(a, b, c);
|
||||
INSERT INTO t1 VALUES(randstr(50,50), randstr(100,100), randstr(10,10));
|
||||
INSERT INTO t1 SELECT randstr(50,50), randstr(9,9), randstr(90,90) FROM t1;
|
||||
INSERT INTO t1 SELECT randstr(50,50), randstr(9,9), randstr(90,90) FROM t1;
|
||||
INSERT INTO t1 SELECT randstr(50,50), randstr(9,9), randstr(90,90) FROM t1;
|
||||
INSERT INTO t1 SELECT randstr(50,50), randstr(9,9), randstr(90,90) FROM t1;
|
||||
INSERT INTO t1 SELECT randstr(50,50), randstr(9,9), randstr(90,90) FROM t1;
|
||||
} -tclbody {
|
||||
sqlite3_release_memory
|
||||
} -sqlbody {
|
||||
COMMIT;
|
||||
}
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
||||
Reference in New Issue
Block a user