Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix a couple of problems with new test scripts causing the permutations test to fail. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
48d736c0ee1ac0879bd12d2f1901f208 |
User & Date: | dan 2014-01-27 16:35:15.028 |
Context
2014-01-28
| ||
17:49 | Minor bugfix in main.c so that the library builds with SQLITE_OMIT_WSD defined. (check-in: 5e3b9ecc7b user: dan tags: trunk) | |
2014-01-27
| ||
16:35 | Fix a couple of problems with new test scripts causing the permutations test to fail. (check-in: 48d736c0ee user: dan tags: trunk) | |
15:02 | Update some requirements marks to conform with improvements in the documentation. (check-in: be1acb610f user: drh tags: trunk) | |
Changes
Changes to test/corruptH.test.
︙ | ︙ | |||
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | hexio_write test.db [expr {($fl-1) * 1024 + 4}] 00000001 hexio_write test.db [expr {($fl-1) * 1024 + 8}] [format %.8X $r(t1)] hexio_write test.db 36 00000002 sqlite3 db test.db } {} do_test 2.3 { list [catch { db eval { SELECT * FROM t1 WHERE a IN (1, 2) } { db eval { INSERT INTO t2 SELECT randomblob(100) FROM t2; INSERT INTO t2 SELECT randomblob(100) FROM t2; INSERT INTO t2 SELECT randomblob(100) FROM t2; INSERT INTO t2 SELECT randomblob(100) FROM t2; INSERT INTO t2 SELECT randomblob(100) FROM t2; } } } msg] $msg | > > > > > > > > > > > > > > > > > > > > > > > > > < > | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | hexio_write test.db [expr {($fl-1) * 1024 + 4}] 00000001 hexio_write test.db [expr {($fl-1) * 1024 + 8}] [format %.8X $r(t1)] hexio_write test.db 36 00000002 sqlite3 db test.db } {} # The corruption migration caused by the test case below does not # cause corruption to be detected in mmap mode. # # The trick here is that the root page of the tree scanned by the outer # query is also currently on the free-list. So while the first seek on # the table (for a==1) works, by the time the second is attempted The # "INSERT INTO t2..." statements have recycled the root page of t1 and # used it as an index leaf. Normally, BtreeMovetoUnpacked() detects # that the PgHdr object associated with said root page does not match # the cursor (as it is now marked with PgHdr.intKey==0) and returns # SQLITE_CORRUPT. # # However, in mmap mode, the outer query and the inner queries use # different PgHdr objects (same data, but different PgHdr container # objects). And so the corruption is not detected. Instead, the second # seek fails to find anything and only a single row is returned. # set res23 {1 {database disk image is malformed}} if {[permutation]=="mmap"} { set res23 {0 one} } do_test 2.3 { list [catch { set res [list] db eval { SELECT * FROM t1 WHERE a IN (1, 2) } { db eval { INSERT INTO t2 SELECT randomblob(100) FROM t2; INSERT INTO t2 SELECT randomblob(100) FROM t2; INSERT INTO t2 SELECT randomblob(100) FROM t2; INSERT INTO t2 SELECT randomblob(100) FROM t2; INSERT INTO t2 SELECT randomblob(100) FROM t2; } lappend res $b } set res } msg] $msg } $res23 #------------------------------------------------------------------------- reset_db # Initialize the database. # do_execsql_test 3.1 { |
︙ | ︙ |
Changes to test/pager4.test.
1 2 3 4 5 6 7 8 9 10 11 | # 2013-12-06 # # 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. # #*********************************************************************** # | | > > > > > | 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 | # 2013-12-06 # # 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. # #*********************************************************************** # # Tests for the SQLITE_READONLY_DBMOVED error condition: the database file # is unlinked or renamed out from under SQLite. # if {$tcl_platform(platform)!="unix"} return set testdir [file dirname $argv0] source $testdir/tester.tcl if {[permutation]=="inmemory_journal"} { finish_test return } # Create a database file for testing # do_execsql_test pager4-1.1 { CREATE TABLE t1(a,b,c); INSERT INTO t1 VALUES(673,'stone','philips'); SELECT * FROM t1; |
︙ | ︙ |