Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add configurations featuring the -ftrapv switch and large values for SQLITE_MAX_ATTACHED to releasetest.tcl. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
989588abf3e88e198b7224604d54f7dc |
User & Date: | dan 2011-04-06 12:37:09.027 |
Context
2011-04-06
| ||
12:38 | Update a comment in sqliteLimit.h. No changes to code or tests. (check-in: b7296fd380 user: dan tags: trunk) | |
12:37 | Add configurations featuring the -ftrapv switch and large values for SQLITE_MAX_ATTACHED to releasetest.tcl. (check-in: 989588abf3 user: dan tags: trunk) | |
2011-04-05
| ||
22:08 | Suppress many harmless compiler warnings, mostly signed/unsigned comparisons within asserts or unused parameters in extensions. (check-in: 3eeb0ff78d user: drh tags: trunk) | |
Changes
Added test/attach4.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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | # 200 July 1 # # 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 implements regression tests for SQLite library. The # focus of this script is attaching many database files to a single # connection. # set testdir [file dirname $argv0] source $testdir/tester.tcl set testprefix attach4 ifcapable !attach { finish_test return } puts "Testing with SQLITE_MAX_ATTACHED=$SQLITE_MAX_ATTACHED" set files {main test.db} for {set ii 0} {$ii < $SQLITE_MAX_ATTACHED} {incr ii} { lappend files aux$ii "test.db$ii" } do_test 1.1 { sqlite3_limit db SQLITE_LIMIT_ATTACHED -1 } $SQLITE_MAX_ATTACHED do_test 1.2.1 { db close foreach {name f} $files { forcedelete $f } sqlite3 db test.db foreach {name f} $files { if {$name == "main"} continue execsql "ATTACH '$f' AS $name" } db eval {PRAGMA database_list} { lappend L $name [file tail $file] } set L } $files do_catchsql_test 1.2.2 { ATTACH 'x.db' AS next; } [list 1 "too many attached databases - max $SQLITE_MAX_ATTACHED"] do_test 1.3 { execsql BEGIN; foreach {name f} $files { execsql "CREATE TABLE $name.tbl(x)" execsql "INSERT INTO $name.tbl VALUES('$f')" } execsql COMMIT; } {} do_test 1.4 { set L [list] foreach {name f} $files { lappend L $name [execsql "SELECT x FROM $name.tbl"] } set L } $files set L [list] set S "" foreach {name f} $files { lappend L wal append S " PRAGMA $name.journal_mode = WAL; UPDATE $name.tbl SET x = '$name'; " } do_execsql_test 1.5 $S $L do_test 1.6 { set L [list] foreach {name f} $files { lappend L [execsql "SELECT x FROM $name.tbl"] $f } set L } $files do_test 1.7 { execsql BEGIN; foreach {name f} $files { execsql "UPDATE $name.tbl SET x = '$f'" } execsql COMMIT; } {} do_test 1.8 { set L [list] foreach {name f} $files { lappend L $name [execsql "SELECT x FROM $name.tbl"] } set L } $files db close foreach {name f} $files { forcedelete $f } finish_test |
Changes to test/releasetest.tcl.
︙ | ︙ | |||
56 57 58 59 60 61 62 63 64 65 66 67 68 69 | ######################################################## } array set ::Configs { "Default" { -O2 } "Unlock-Notify" { -O2 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_THREADSAFE -DSQLITE_TCL_DEFAULT_FULLMUTEX=1 } "Secure-Delete" { | > > > > > | 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | ######################################################## } array set ::Configs { "Default" { -O2 } "Ftrapv" { -O2 -ftrapv -DSQLITE_MAX_ATTACHED=55 -DSQLITE_TCL_DEFAULT_FULLMUTEX=1 } "Unlock-Notify" { -O2 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_THREADSAFE -DSQLITE_TCL_DEFAULT_FULLMUTEX=1 } "Secure-Delete" { |
︙ | ︙ | |||
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | -DSQLITE_MAX_LENGTH=2147483645 -DSQLITE_MAX_VARIABLE_NUMBER=500000 -DSQLITE_DEBUG=1 -DSQLITE_PREFER_PROXY_LOCKING=1 } "Extra-Robustness" { -DSQLITE_ENABLE_OVERSIZE_CELL_CHECK=1 } } array set ::Platforms { Linux-x86_64 { "Secure-Delete" test "Unlock-Notify" "QUICKTEST_INCLUDE=notify2.test test" "Update-Delete-Limit" test "Debug-One" test "Extra-Robustness" test "Device-Two" test "Default" "threadtest test" "Device-One" fulltest } Linux-i686 { "Unlock-Notify" "QUICKTEST_INCLUDE=notify2.test test" "Device-One" test "Device-Two" test | > > | 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | -DSQLITE_MAX_LENGTH=2147483645 -DSQLITE_MAX_VARIABLE_NUMBER=500000 -DSQLITE_DEBUG=1 -DSQLITE_PREFER_PROXY_LOCKING=1 } "Extra-Robustness" { -DSQLITE_ENABLE_OVERSIZE_CELL_CHECK=1 -DSQLITE_MAX_ATTACHED=62 } } array set ::Platforms { Linux-x86_64 { "Secure-Delete" test "Unlock-Notify" "QUICKTEST_INCLUDE=notify2.test test" "Update-Delete-Limit" test "Debug-One" test "Extra-Robustness" test "Device-Two" test "Ftrapv" test "Default" "threadtest test" "Device-One" fulltest } Linux-i686 { "Unlock-Notify" "QUICKTEST_INCLUDE=notify2.test test" "Device-One" test "Device-Two" test |
︙ | ︙ |