SQLite

Check-in [0a64a937b5]
Login

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

Overview
Comment:Add a test case for the OOM-fault corruption issue. Ticket [9d68c883132c8].
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0a64a937b583c32c02c83fc669addf79662efea8
User & Date: drh 2010-04-09 23:05:25.000
Context
2010-04-10
17:52
Fix issues and clarify the operation of pager_playback_one_page(). A block comment in pager.c identifies 13 invariants on the pager subsystem. Ticket [9d68c883132c8]. (check-in: 0906597698 user: drh tags: trunk)
2010-04-09
23:05
Add a test case for the OOM-fault corruption issue. Ticket [9d68c883132c8]. (check-in: 0a64a937b5 user: drh tags: trunk)
15:34
Candidate fix for a pager bug associated with sqlite3PagerMovepage(). (check-in: 8c046eb6d1 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Added test/tkt-9d68c883.test.










































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# 2010 April 10
#
# The author disclaims copyright to this source code.  In place of
# a legal notice, here is a blessing:
#
#    May you do good and not evil.
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file tests that bug  9d68c883132c8e9ffcd5b0c148c990807b5df1b7
# is fixed.
#

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

do_test tkt-XYZ-1.1 {
  execsql {
    PRAGMA page_size = 1024;
    PRAGMA auto_vacuum = 2;
    CREATE TABLE t3(x);
    CREATE TABLE t4(x);
    CREATE TABLE t5(x);
    INSERT INTO t5 VALUES(randomblob(1500));
    CREATE TABLE t7(x);
    CREATE TABLE t8(x);
  }
} {}


for {set i 0} {$i < 100} {incr i} {
  db close
  sqlite3_simulate_device -sectorsize 8192
  sqlite3 db test.db -vfs devsym

  do_test tkt-XYZ-2.$i {
    execsql {
      BEGIN;
        DELETE FROM t5;
        INSERT INTO t8 VALUES('hello world');
    }
  
    sqlite3_memdebug_fail $i -repeat 0
    catchsql { DROP TABLE t7; }
    sqlite3_memdebug_fail -1

    catchsql { ROLLBACK }
    execsql { PRAGMA integrity_check }
  } {ok}
}

finish_test