1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-27 20:41:58 +03:00

Merge the latest trunk changes (especially "PRAGMA busy_timeout" and the

ORDER BY query planner optimizations) into the sessions branch.

FossilOrigin-Name: 6ca8eae1f89d19ee23cbc3a869d85b57d29b4a7d
This commit is contained in:
drh
2012-09-28 13:05:48 +00:00
80 changed files with 2418 additions and 1186 deletions

View File

@ -31,6 +31,7 @@
# Test the capability of the SQLite version built into the interpreter to
# determine if a specific test can be run:
#
# capable EXPR
# ifcapable EXPR
#
# Calulate checksums based on database contents:
@ -134,7 +135,7 @@ proc getFileRetries {} {
# NOTE: Return the default number of retries for [file] operations. A
# value of zero or less here means "disabled".
#
return [expr {$::tcl_platform(platform) eq "windows" ? 10 : 0}]
return [expr {$::tcl_platform(platform) eq "windows" ? 50 : 0}]
}
return $::G(file-retries)
}
@ -537,16 +538,19 @@ proc do_test {name cmd expected} {
} else {
if {[regexp {^~?/.*/$} $expected]} {
if {[string index $expected 0]=="~"} {
set re [string range $expected 2 end-1]
set re [string map {# {[-0-9.]+}} [string range $expected 2 end-1]]
set ok [expr {![regexp $re $result]}]
} else {
set re [string range $expected 1 end-1]
set re [string map {# {[-0-9.]+}} [string range $expected 1 end-1]]
set ok [regexp $re $result]
}
} else {
set ok [expr {[string compare $result $expected]==0}]
}
if {!$ok} {
# if {![info exists ::testprefix] || $::testprefix eq ""} {
# error "no test prefix"
# }
puts "\nExpected: \[$expected\]\n Got: \[$result\]"
fail_test $name
} else {
@ -1000,6 +1004,12 @@ proc fix_ifcapable_expr {expr} {
return $ret
}
# Returns non-zero if the capabilities are present; zero otherwise.
#
proc capable {expr} {
set e [fix_ifcapable_expr $expr]; return [expr ($e)]
}
# Evaluate a boolean expression of capabilities. If true, execute the
# code. Omit the code if false.
#