File: txn012script.tcl

package info (click to toggle)
db5.3 5.3.28%2Bdfsg2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 158,500 kB
  • sloc: ansic: 448,411; java: 111,824; tcl: 80,544; sh: 44,264; cs: 33,697; cpp: 21,604; perl: 14,557; xml: 10,799; makefile: 4,077; javascript: 1,998; yacc: 1,003; awk: 965; sql: 801; erlang: 342; python: 216; php: 24; asm: 14
file content (33 lines) | stat: -rw-r--r-- 911 bytes parent folder | download | duplicates (8)
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
# See the file LICENSE for redistribution information.
#
# Copyright (c) 2005, 2013 Oracle and/or its affiliates.  All rights reserved.
#
# $Id$
#
# Script to check that txn names can be seen across processes.
# Names over 50 characters will be truncated.
#
# Usage: txn012script dir txnname longtxnname

source ./include.tcl
source $test_path/test.tcl

set usage "txn012script dir txnname longtxnname"

# Verify usage
if { $argc != 3 } {
	puts stderr "FAIL:[timestamp] Usage: $usage"
	exit
}

# Initialize arguments
set dir [ lindex $argv 0 ]
set txnname [ lindex $argv 1 ]
set longtxnname [ lindex $argv 2 ]

# Run db_stat to view txn names.
set stat [exec $util_path/db_stat -h $dir -t]
error_check_good txnname [is_substr $stat $txnname] 1
error_check_good longtxnname [is_substr $stat $longtxnname] 0
set truncname [string range $longtxnname 0 49]
error_check_good truncname [is_substr $stat $truncname] 1