summaryrefslogtreecommitdiff
path: root/bdb/test/sdbtest001.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'bdb/test/sdbtest001.tcl')
-rw-r--r--bdb/test/sdbtest001.tcl43
1 files changed, 30 insertions, 13 deletions
diff --git a/bdb/test/sdbtest001.tcl b/bdb/test/sdbtest001.tcl
index e3ff2b032d3..b8b4508c2a4 100644
--- a/bdb/test/sdbtest001.tcl
+++ b/bdb/test/sdbtest001.tcl
@@ -1,18 +1,26 @@
# See the file LICENSE for redistribution information.
#
-# Copyright (c) 1999, 2000
+# Copyright (c) 1999-2002
# Sleepycat Software. All rights reserved.
#
-# $Id: sdbtest001.tcl,v 11.13 2000/08/25 14:21:53 sue Exp $
+# $Id: sdbtest001.tcl,v 11.19 2002/05/22 15:42:42 sue Exp $
#
-# Sub DB All-Method Test 1
-# Make several subdb's of different access methods all in one DB.
-# Rotate methods and repeat [#762].
-# Use the first 10,000 entries from the dictionary.
-# Insert each with self as key and data; retrieve each.
-# After all are entered, retrieve all; compare output to original.
-# Close file, reopen, do retrieve and re-verify.
-proc subdbtest001 { {nentries 10000} } {
+# TEST sdbtest001
+# TEST Tests multiple access methods in one subdb
+# TEST Open several subdbs, each with a different access method
+# TEST Small keys, small data
+# TEST Put/get per key per subdb
+# TEST Dump file, verify per subdb
+# TEST Close, reopen per subdb
+# TEST Dump file, verify per subdb
+# TEST
+# TEST Make several subdb's of different access methods all in one DB.
+# TEST Rotate methods and repeat [#762].
+# TEST Use the first 10,000 entries from the dictionary.
+# TEST Insert each with self as key and data; retrieve each.
+# TEST After all are entered, retrieve all; compare output to original.
+# TEST Close file, reopen, do retrieve and re-verify.
+proc sdbtest001 { {nentries 10000} } {
source ./include.tcl
puts "Subdbtest001: many different subdb access methods in one"
@@ -41,16 +49,25 @@ proc subdbtest001 { {nentries 10000} } {
lappend method_list [list "-btree" "-rbtree" "-ddbtree" "-dbtree"]
lappend method_list [list "-dbtree" "-ddbtree" "-btree" "-rbtree"]
lappend method_list [list "-ddbtree" "-dbtree" "-rbtree" "-btree"]
+ set plist [list 512 8192 1024 4096 2048 16384]
+ set mlen [llength $method_list]
+ set plen [llength $plist]
+ while { $plen < $mlen } {
+ set plist [concat $plist $plist]
+ set plen [llength $plist]
+ }
+ set pgsz 0
foreach methods $method_list {
cleanup $testdir NULL
puts "\tSubdbtest001.a: create subdbs of different access methods:"
puts "\tSubdbtest001.a: $methods"
- set psize {8192 4096}
set nsubdbs [llength $methods]
set duplist ""
for { set i 0 } { $i < $nsubdbs } { incr i } {
lappend duplist -1
}
+ set psize [lindex $plist $pgsz]
+ incr pgsz
set newent [expr $nentries / $nsubdbs]
build_all_subdb $testfile $methods $psize $duplist $newent
@@ -95,7 +112,7 @@ proc subdbtest001 { {nentries 10000} } {
puts "\tSubdbtest001.c: sub$subdb.db: close, open, and dump file"
# Now, reopen the file and run the last test again.
- open_and_dump_subfile $testfile NULL $txn $t1 $checkfunc \
+ open_and_dump_subfile $testfile NULL $t1 $checkfunc \
dump_file_direction "-first" "-next" sub$subdb.db
if { [string compare $method "-recno"] != 0 } {
filesort $t1 $t3
@@ -107,7 +124,7 @@ proc subdbtest001 { {nentries 10000} } {
# Now, reopen the file and run the last test again in the
# reverse direction.
puts "\tSubdbtest001.d: sub$subdb.db: close, open, and dump file in reverse direction"
- open_and_dump_subfile $testfile NULL $txn $t1 $checkfunc \
+ open_and_dump_subfile $testfile NULL $t1 $checkfunc \
dump_file_direction "-last" "-prev" sub$subdb.db
if { [string compare $method "-recno"] != 0 } {