mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Add some further tests and a bugfix for the atomic-write optimization. (CVS 4276)
FossilOrigin-Name: 5f0fb894f44069c4aa9b8dba62b4d8a262c991de
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
# This file implements some common TCL routines used for regression
|
||||
# testing the SQLite library
|
||||
#
|
||||
# $Id: tester.tcl,v 1.87 2007/08/23 02:47:54 drh Exp $
|
||||
# $Id: tester.tcl,v 1.88 2007/08/23 11:07:10 danielk1977 Exp $
|
||||
|
||||
# Make sure tclsqlite3 was compiled correctly. Abort now with an
|
||||
# error message if not.
|
||||
@ -350,7 +350,7 @@ proc ifcapable {expr code {else ""} {elsecode ""}} {
|
||||
# error message. This is "child process exited abnormally" if the crash
|
||||
# occured.
|
||||
#
|
||||
# crashsql -delay CRASHDELAY -file CRASHFILE ?-blocksize BLOCKSIZE $sql
|
||||
# crashsql -delay CRASHDELAY -file CRASHFILE ?-blocksize BLOCKSIZE? $sql
|
||||
#
|
||||
proc crashsql {args} {
|
||||
if {$::tcl_platform(platform)!="unix"} {
|
||||
@ -360,6 +360,7 @@ proc crashsql {args} {
|
||||
set blocksize ""
|
||||
set crashdelay 1
|
||||
set crashfile ""
|
||||
set dc ""
|
||||
set sql [lindex $args end]
|
||||
|
||||
for {set ii 0} {$ii < [llength $args]-1} {incr ii 2} {
|
||||
@ -370,6 +371,7 @@ proc crashsql {args} {
|
||||
if {$n>1 && [string first $z -delay]==0} {set crashdelay $z2} \
|
||||
elseif {$n>1 && [string first $z -file]==0} {set crashfile $z2} \
|
||||
elseif {$n>1 && [string first $z -blocksize]==0} {set blocksize "-s $z2" } \
|
||||
elseif {$n>1 && [string first $z -characteristics]==0} {set dc "-c {$z2}" } \
|
||||
else { error "Unrecognized option: $z" }
|
||||
}
|
||||
|
||||
@ -380,7 +382,7 @@ proc crashsql {args} {
|
||||
set cfile [file join [pwd] $crashfile]
|
||||
|
||||
set f [open crash.tcl w]
|
||||
puts $f "sqlite3_crashparams $blocksize $crashdelay $cfile"
|
||||
puts $f "sqlite3_crashparams $blocksize $dc $crashdelay $cfile"
|
||||
puts $f "set sqlite_pending_byte $::sqlite_pending_byte"
|
||||
puts $f "sqlite3 db test.db"
|
||||
|
||||
|
Reference in New Issue
Block a user