mariadb/bdb/test/test084.tcl

54 lines
1.5 KiB
Tcl
Raw Normal View History

2001-03-05 01:42:05 +01:00
# See the file LICENSE for redistribution information.
#
2002-10-30 12:57:05 +01:00
# Copyright (c) 2000-2002
2001-03-05 01:42:05 +01:00
# Sleepycat Software. All rights reserved.
#
2002-10-30 12:57:05 +01:00
# $Id: test084.tcl,v 11.11 2002/07/13 18:09:14 margo Exp $
2001-03-05 01:42:05 +01:00
#
2002-10-30 12:57:05 +01:00
# TEST test084
# TEST Basic sanity test (test001) with large (64K) pages.
2001-03-05 01:42:05 +01:00
proc test084 { method {nentries 10000} {tnum 84} {pagesize 65536} args} {
source ./include.tcl
2002-10-30 12:57:05 +01:00
set txnenv 0
2001-03-05 01:42:05 +01:00
set eindex [lsearch -exact $args "-env"]
#
# If we are using an env, then testfile should just be the db name.
# Otherwise it is the test directory and the name.
if { $eindex == -1 } {
set testfile $testdir/test0$tnum-empty.db
set env NULL
} else {
set testfile test0$tnum-empty.db
incr eindex
set env [lindex $args $eindex]
2002-10-30 12:57:05 +01:00
set txnenv [is_txnenv $env]
if { $txnenv == 1 } {
append args " -auto_commit "
}
set testdir [get_home $env]
2001-03-05 01:42:05 +01:00
}
set pgindex [lsearch -exact $args "-pagesize"]
if { $pgindex != -1 } {
puts "Test084: skipping for specific pagesizes"
return
}
cleanup $testdir $env
set args "-pagesize $pagesize $args"
2002-10-30 12:57:05 +01:00
eval {test001 $method $nentries 0 $tnum 0} $args
2001-03-05 01:42:05 +01:00
set omethod [convert_method $method]
set args [convert_args $method $args]
# For good measure, create a second database that's empty
# with the large page size. (There was a verifier bug that
# choked on empty 64K pages. [#2408])
set db [eval {berkdb_open -create -mode 0644} $args $omethod $testfile]
error_check_good empty_db [is_valid_db $db] TRUE
error_check_good empty_db_close [$db close] 0
}