1# See the file LICENSE for redistribution information. 2# 3# Copyright (c) 1996,2008 Oracle. All rights reserved. 4# 5# $Id: dead007.tcl,v 12.6 2008/01/08 20:58:53 bostic Exp $ 6# 7# TEST dead007 8# TEST Tests for locker and txn id wraparound. 9proc dead007 { {tnum "007"} } { 10 source ./include.tcl 11 global lock_curid 12 global lock_maxid 13 14 set save_curid $lock_curid 15 set save_maxid $lock_maxid 16 puts "Dead$tnum.a -- wrap around" 17 set lock_curid [expr $lock_maxid - 2] 18 dead001 "2 10" "ring clump" "0" $tnum 19 ## Oldest/youngest breaks when the id wraps 20 # dead003 "4 10" 21 dead004 $tnum 22 23 puts "Dead$tnum.b -- extend space" 24 set lock_maxid [expr $lock_maxid - 3] 25 set lock_curid [expr $lock_maxid - 1] 26 dead001 "4 10" "ring clump" "0" $tnum 27 ## Oldest/youngest breaks when the id wraps 28 # dead003 "10" 29 dead004 $tnum 30 31 set lock_curid $save_curid 32 set lock_maxid $save_maxid 33 # Return the empty string so we don't return lock_maxid. 34 return "" 35} 36