summaryrefslogtreecommitdiff
path: root/test/tcl/test042.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'test/tcl/test042.tcl')
-rw-r--r--test/tcl/test042.tcl73
1 files changed, 62 insertions, 11 deletions
diff --git a/test/tcl/test042.tcl b/test/tcl/test042.tcl
index 6b26e2dd..13f3ddbd 100644
--- a/test/tcl/test042.tcl
+++ b/test/tcl/test042.tcl
@@ -1,6 +1,6 @@
# See the file LICENSE for redistribution information.
#
-# Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1996, 2015 Oracle and/or its affiliates. All rights reserved.
#
# $Id$
#
@@ -17,7 +17,8 @@
# TEST pid to the data string (sometimes doing a rewrite sometimes doing a
# TEST partial put). Some will use cursors to traverse through a few keys
# TEST before finding one to write.
-
+# TEST
+# TEST Run the test with blob enabled and disabled.
proc test042 { method {nentries 1000} args } {
global encrypt
@@ -37,14 +38,51 @@ proc test042 { method {nentries 1000} args } {
return
}
- if { [is_heap $method] } {
- puts "Test042 skipping for method $method"
- return
- }
- # Don't 'eval' the args here -- we want them to stay in
- # a lump until we pass them to berkdb_open and mdbscript.
- test042_body $method $nentries 0 $args
- test042_body $method $nentries 1 $args
+ if { [is_heap $method] } {
+ puts "Test042 skipping for method $method"
+ return
+ }
+
+ #
+ # Set blob threshold as 5 since most words in the wordlist to put into
+ # the database have length <= 10.
+ #
+ set threshold 5
+ set orig_args $args
+ foreach blob [list "" " -blob_threshold $threshold"] {
+ set args $orig_args
+
+ if { $blob != "" } {
+ # Blob is supported by btree, hash and heap.
+ if { [is_btree $method] != 1 &&
+ [is_hash $method] != 1 } {
+ puts "Test042 skipping\
+ for method $method for blob"
+ return
+ }
+ # Look for incompatible configurations of blob.
+ foreach conf { "-compress" \
+ "-dup" "-dupsort" "-read_uncommitted" \
+ "-multiversion" } {
+ if { [lsearch -exact $args $conf] != -1 } {
+ puts "Test042 skipping $conf for blob"
+ return
+ }
+ }
+ if { [lsearch -exact $args "-chksum"] != -1 } {
+ set indx [lsearch -exact $args "-chksum"]
+ set args [lreplace $args $indx $indx]
+ puts "Test042 ignoring -chksum for blob"
+ }
+
+ # Set up the blob arguments.
+ append args $blob
+ }
+ # Don't 'eval' the args here -- we want them to stay in
+ # a lump until we pass them to berkdb_open and mdbscript.
+ test042_body $method $nentries 0 $args
+ test042_body $method $nentries 1 $args
+ }
}
proc test042_body { method nentries alldb args } {
@@ -55,13 +93,26 @@ proc test042_body { method nentries alldb args } {
} else {
set eflag "-cdb"
}
- puts "Test042: CDB Test ($eflag) $method $nentries"
+ set msg ""
+ puts "Test042: CDB Test ($eflag) $method $nentries ($msg)"
# Set initial parameters
set do_exit 0
set iter 10000
set procs 5
+ if { [lsearch -exact [lindex $args 0] "-blob_threshold"] != -1 } {
+ set msg "with blob"
+ #
+ # This test runs a bit slowly when blob gets enabled, so
+ # reduce the number of entries and iterations for blobs.
+ #
+ if { $nentries == 1000 } {
+ set nentries 100
+ }
+ set iter 1000
+ }
+
# Process arguments
set oargs ""
for { set i 0 } { $i < [llength $args] } {incr i} {