summaryrefslogtreecommitdiff
path: root/libdb/test/dead007.tcl
blob: 5e8a220c748820c796f02463d76bcfa4aeb2a5e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# See the file LICENSE for redistribution information.
#
# Copyright (c) 1996-2002
#	Sleepycat Software.  All rights reserved.
#
# $Id$
#
# TEST	dead007
# TEST	use timeouts rather than the normal dd algorithm.
proc dead007 { } {
	source ./include.tcl
	global lock_curid
	global lock_maxid

	set save_curid $lock_curid
	set save_maxid $lock_maxid
	puts "Dead007.a -- wrap around"
	set lock_curid [expr $lock_maxid - 2]
	dead001 "2 10"
	## Oldest/youngest breaks when the id wraps
	# dead003 "4 10"
	dead004

	puts "Dead007.b -- extend space"
	set lock_maxid [expr $lock_maxid - 3]
	set lock_curid [expr $lock_maxid - 1]
	dead001 "4 10"
	## Oldest/youngest breaks when the id wraps
	# dead003 "10"
	dead004

	set lock_curid $save_curid
	set lock_maxid $save_maxid
}