mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-31 22:25:30 +00:00
29 lines
833 B
Tcl
29 lines
833 B
Tcl
# Make sure that if we do PREVs on a log, but the beginning of the
|
|
# log has been truncated, we do the right thing.
|
|
proc bug006 { } {
|
|
source ./include.tcl
|
|
puts "Bug006: Prev on log when beginning of log has been truncated."
|
|
# Use archive test to populate log
|
|
cleanup $testdir
|
|
archive
|
|
|
|
# Delete all log files under 50
|
|
set ret [catch { glob $testdir/log.000* } result]
|
|
if { $ret == 0 } {
|
|
eval exec $RM -rf $result
|
|
}
|
|
|
|
# Now open the log and get the first record and try a prev
|
|
set lp [log "" 0 0]
|
|
error_check_good log_open [is_substr $lp log] 1
|
|
|
|
set ret [$lp get "0 0" $DB_FIRST]
|
|
error_check_bad log_get [string length $ret] 0
|
|
|
|
# This should give DB_NOTFOUND which is a ret of length 0
|
|
set ret [$lp get "0 0" $DB_PREV]
|
|
error_check_good log_get_prev [string length $ret] 0
|
|
|
|
error_check_good log_close [$lp close] 0
|
|
}
|