1
# See the file LICENSE for redistribution information.
3
# Copyright (c) 1996-2002
4
# Sleepycat Software. All rights reserved.
10
# TEST Test of wraparound txnids (txn001)
16
set orig_curid $txn_curid
17
set orig_maxid $txn_maxid
18
puts "\tTxn004.1: wraparound txnids"
19
set txn_curid [expr $txn_maxid - 2]
21
puts "\tTxn004.2: closer wraparound txnids"
22
set txn_curid [expr $txn_maxid - 3]
23
set txn_maxid [expr $txn_maxid - 2]
26
puts "\tTxn004.3: test wraparound txnids"
27
txn_idwrap_check $testdir
28
set txn_curid $orig_curid
29
set txn_maxid $orig_maxid
33
proc txn_idwrap_check { testdir } {
39
# Open/create the txn region
40
set e [berkdb_env -create -txn -home $testdir]
41
error_check_good env_open [is_substr $e env] 1
44
error_check_good txn1 [is_valid_txn $txn1 $e] TRUE
45
error_check_good txn_id_set \
46
[$e txn_id_set [expr $txn_maxid - 1] $txn_maxid] 0
49
error_check_good txn2 [is_valid_txn $txn2 $e] TRUE
51
# txn3 will require a wraparound txnid
52
# XXX How can we test it has a wrapped id?
54
error_check_good wrap_txn3 [is_valid_txn $txn3 $e] TRUE
56
error_check_good free_txn1 [$txn1 commit] 0
57
error_check_good free_txn2 [$txn2 commit] 0
58
error_check_good free_txn3 [$txn3 commit] 0
60
error_check_good close [$e close] 0