1# See the file LICENSE for redistribution information. 2# 3# Copyright (c) 2005,2008 Oracle. All rights reserved. 4# 5# $Id: txn012script.tcl,v 12.7 2008/01/08 20:58:53 bostic Exp $ 6# 7# Script to check that txn names can be seen across processes. 8# Names over 50 characters will be truncated. 9# 10# Usage: txn012script dir txnname longtxnname 11 12source ./include.tcl 13source $test_path/test.tcl 14 15set usage "txn012script dir txnname longtxnname" 16 17# Verify usage 18if { $argc != 3 } { 19 puts stderr "FAIL:[timestamp] Usage: $usage" 20 exit 21} 22 23# Initialize arguments 24set dir [ lindex $argv 0 ] 25set txnname [ lindex $argv 1 ] 26set longtxnname [ lindex $argv 2 ] 27 28# Run db_stat to view txn names. 29set stat [exec $util_path/db_stat -h $dir -t] 30error_check_good txnname [is_substr $stat $txnname] 1 31error_check_good longtxnname [is_substr $stat $longtxnname] 0 32set truncname [string range $longtxnname 0 49] 33error_check_good truncname [is_substr $stat $truncname] 1 34