/ Check-in [3418f1f1]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Disable the page cache bulk allocation for the shrink.test and wal.test modules.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3418f1f165a0746cdf130e6a19fa0e1eb56df1d4
User & Date: drh 2015-07-25 03:10:12
Context
2015-07-25
12:03
Fix a test script problem in memsubsys2.test. check-in: 70885729 user: dan tags: trunk
03:10
Disable the page cache bulk allocation for the shrink.test and wal.test modules. check-in: 3418f1f1 user: drh tags: trunk
2015-07-24
23:28
Fix the zeroblob.test script so that it works even on builds where the SQLITE_MAX_LENGTH has been raised to 2147483645. check-in: db129149 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/shrink.test.

11
12
13
14
15
16
17

18
19
20
21
22
23
24
..
39
40
41
42
43
44
45

46
#
# This file contains test cases for sqlite3_db_release_memory and
# the PRAGMA shrink_memory statement.
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl


unset -nocomplain baseline
do_test shrink-1.1 {
  db eval {
    PRAGMA cache_size = 2000;
    CREATE TABLE t1(x,y);
    INSERT INTO t1 VALUES(randomblob(1000000),1);
................................................................................
} {1}
do_test shrink-1.3 {
  set baseline [sqlite3_memory_used]
  db eval {PRAGMA shrink_memory}
  expr {$::baseline > [sqlite3_memory_used]+500000}
} {1}


finish_test







>







 







>

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
..
40
41
42
43
44
45
46
47
48
#
# This file contains test cases for sqlite3_db_release_memory and
# the PRAGMA shrink_memory statement.
#

set testdir [file dirname $argv0]
source $testdir/tester.tcl
test_set_config_pagecache 0 0

unset -nocomplain baseline
do_test shrink-1.1 {
  db eval {
    PRAGMA cache_size = 2000;
    CREATE TABLE t1(x,y);
    INSERT INTO t1 VALUES(randomblob(1000000),1);
................................................................................
} {1}
do_test shrink-1.3 {
  set baseline [sqlite3_memory_used]
  db eval {PRAGMA shrink_memory}
  expr {$::baseline > [sqlite3_memory_used]+500000}
} {1}

test_restore_config_pagecache
finish_test

Changes to test/wal.test.

18
19
20
21
22
23
24

25
26
27
28
29
30
31
....
1583
1584
1585
1586
1587
1588
1589

1590
source $testdir/lock_common.tcl
source $testdir/malloc_common.tcl
source $testdir/wal_common.tcl

set testprefix wal

ifcapable !wal {finish_test ; return }


proc reopen_db {} {
  catch { db close }
  forcedelete test.db test.db-wal test.db-wal-summary
  sqlite3_wal db test.db
}

................................................................................
  do_test wal-25.$mode {
    db eval "PRAGMA journal_mode=$mode"
    db eval {ATTACH 'test2.db' AS t2; PRAGMA journal_mode=WAL;}
  } {wal}
  db close
}


finish_test







>







 







>

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
....
1584
1585
1586
1587
1588
1589
1590
1591
1592
source $testdir/lock_common.tcl
source $testdir/malloc_common.tcl
source $testdir/wal_common.tcl

set testprefix wal

ifcapable !wal {finish_test ; return }
test_set_config_pagecache 0 0

proc reopen_db {} {
  catch { db close }
  forcedelete test.db test.db-wal test.db-wal-summary
  sqlite3_wal db test.db
}

................................................................................
  do_test wal-25.$mode {
    db eval "PRAGMA journal_mode=$mode"
    db eval {ATTACH 'test2.db' AS t2; PRAGMA journal_mode=WAL;}
  } {wal}
  db close
}

test_restore_config_pagecache
finish_test