1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Merge the skip-scan optimization into the sessions branch.

FossilOrigin-Name: 7596d1bf8040f7cefc7b22c5e609acc5d66820bf
This commit is contained in:
drh
2013-11-14 19:18:39 +00:00
28 changed files with 1255 additions and 624 deletions

View File

@ -616,11 +616,24 @@ proc do_test {name cmd expected} {
# regular expression PATTERN matches the result. "~/PATTERN/" means
# the regular expression must not match.
if {[string index $expected 0]=="~"} {
set re [string map {# {[-0-9.]+}} [string range $expected 2 end-1]]
set ok [expr {![regexp $re $result]}]
set re [string range $expected 2 end-1]
if {[string index $re 0]=="*"} {
# If the regular expression begins with * then treat it as a glob instead
set ok [string match $re $result]
} else {
set re [string map {# {[-0-9.]+}} $re]
set ok [regexp $re $result]
}
set ok [expr {!$ok}]
} else {
set re [string map {# {[-0-9.]+}} [string range $expected 1 end-1]]
set ok [regexp $re $result]
set re [string range $expected 1 end-1]
if {[string index $re 0]=="*"} {
# If the regular expression begins with * then treat it as a glob instead
set ok [string match $re $result]
} else {
set re [string map {# {[-0-9.]+}} $re]
set ok [regexp $re $result]
}
}
} elseif {[regexp {^~?\*.*\*$} $expected]} {
# "expected" is of the form "*GLOB*" then the result if correct if