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 #***********************************************************************
13 set testdir [file dirname $argv0]
14 source $testdir/tester.tcl
15 set testprefix cachespill
17 ifcapable !pager_pragmas {
22 #-------------------------------------------------------------------------
23 # Test that "PRAGMA cache_spill = 0" completely disables cache spilling.
26 PRAGMA auto_vacuum = 0;
27 PRAGMA page_size = 1024;
28 PRAGMA cache_size = 100;
40 SELECT 1 UNION ALL SELECT i+1 FROM s WHERE i<200
41 ) INSERT INTO t1 SELECT randomblob(900) FROM s;
43 expr {[file size test.db] > 50000}
53 PRAGMA cache_spill = 0;
56 SELECT 1 UNION ALL SELECT i+1 FROM s WHERE i<200
57 ) INSERT INTO t1 SELECT randomblob(900) FROM s;
65 PRAGMA cache_spill = 1;
68 SELECT 1 UNION ALL SELECT i+1 FROM s WHERE i<200
69 ) INSERT INTO t1 SELECT randomblob(900) FROM s;
71 expr {[file size test.db] > 50000}
74 do_execsql_test 1.6 { ROLLBACK }