Merged experimental crashsql() into trunk.

FossilOrigin-Name: 01b575ff1aa512f34be78f9d67b6caaf825e5820
This commit is contained in:
shaneh 2010-07-08 16:50:08 +00:00
commit 4677ddff7e
3 changed files with 22 additions and 12 deletions

View File

@ -1,5 +1,5 @@
C Fix\swarning\sin\stest\sfixture\scode.
D 2010-07-08T16:22:52
C Merged\sexperimental\scrashsql()\sinto\strunk.
D 2010-07-08T16:50:08
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in c4270a1cd7cd70a263b7e96a258aa90e9c3618eb
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -615,7 +615,7 @@ F test/tclsqlite.test 8c154101e704170c2be10f137a5499ac2c6da8d3
F test/tempdb.test 800c36623d67a2ad1f58784b9c5644e0405af6e6
F test/temptable.test f42121a0d29a62f00f93274464164177ab1cc24a
F test/temptrigger.test b0273db072ce5f37cf19140ceb1f0d524bbe9f05
F test/tester.tcl 17aa13b61d4d6088b08c543942194bdc3cae685a
F test/tester.tcl cab2b46972cd50c3939a0e30e0b37e73f558bc2d
F test/thread001.test a3e6a7254d1cb057836cb3145b60c10bf5b7e60f
F test/thread002.test afd20095e6e845b405df4f2c920cb93301ca69db
F test/thread003.test b824d4f52b870ae39fc5bae4d8070eca73085dca
@ -832,7 +832,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
P 6a46e64168705a31d86d29a60025f138a42c5b79
R 230fc1c26046bb79cd79e6edb87e96df
P 0bfcf3bcd77acab48344dde87cecb01e877f1a19 8a5811ea80e8415f9ba6b1d9390ed723840402c3
R 88877c3276846acf4750cafa5881b8d1
U shaneh
Z 8fb65eb43637bb03cba7a83e60a48fb4
Z 9cb1c2ec419c9dc18b8023733894c905

View File

@ -1 +1 @@
0bfcf3bcd77acab48344dde87cecb01e877f1a19
01b575ff1aa512f34be78f9d67b6caaf825e5820

View File

@ -654,9 +654,6 @@ proc ifcapable {expr code {else ""} {elsecode ""}} {
# crashsql -delay CRASHDELAY -file CRASHFILE ?-blocksize BLOCKSIZE? $sql
#
proc crashsql {args} {
if {$::tcl_platform(platform)!="unix"} {
error "crashsql should only be used on unix"
}
set blocksize ""
set crashdelay 1
@ -684,7 +681,10 @@ proc crashsql {args} {
error "Compulsory option -file missing"
}
set cfile [file join [pwd] $crashfile]
# $crashfile gets compared to the native filename in
# cfSync(), which can be different then what TCL uses by
# default, so here we force it to the "nativename" format.
set cfile [string map {\\ \\\\} [file nativename [file join [pwd] $crashfile]]]
set f [open crash.tcl w]
puts $f "sqlite3_crash_enable 1"
@ -713,10 +713,20 @@ proc crashsql {args} {
puts $f "}"
}
close $f
set r [catch {
exec [info nameofexec] crash.tcl >@stdout
} msg]
# Windows/ActiveState TCL returns a slightly different
# error message. We map that to the expected message
# so that we don't have to change all of the test
# cases.
if {$::tcl_platform(platform)=="windows"} {
if {$msg=="child killed: unknown signal"} {
set msg "child process exited abnormally"
}
}
lappend r $msg
}