⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 txnscript.tcl

📁 这是linux下运行的mysql软件包,可用于linux 下安装 php + mysql + apach 的网络配置
💻 TCL
字号:
# See the file LICENSE for redistribution information.## Copyright (c) 1996-2002#	Sleepycat Software.  All rights reserved.## $Id: txnscript.tcl,v 11.3 2002/01/23 15:33:40 bostic Exp $## Txn003 script - outstanding child prepare script# Usage: txnscript envcmd dbcmd gidf key data# envcmd: command to open env# dbfile: name of database file# gidf: name of global id file# key: key to use# data: new data to usesource ./include.tclsource $test_path/test.tclsource $test_path/testutils.tclset usage "txnscript envcmd dbfile gidfile key data"# Verify usageif { $argc != 5 } {	puts stderr "FAIL:[timestamp] Usage: $usage"	exit}# Initialize argumentsset envcmd [ lindex $argv 0 ]set dbfile [ lindex $argv 1 ]set gidfile [ lindex $argv 2 ]set key [ lindex $argv 3 ]set data [ lindex $argv 4 ]set dbenv [eval $envcmd]error_check_good envopen [is_valid_env $dbenv] TRUEset usedb 1set db [berkdb_open -auto_commit -env $dbenv $dbfile]error_check_good dbopen [is_valid_db $db] TRUEputs "\tTxnscript.a: begin parent and child txn"set parent [$dbenv txn]error_check_good parent [is_valid_txn $parent $dbenv] TRUEset child [$dbenv txn -parent $parent]error_check_good parent [is_valid_txn $child $dbenv] TRUEputs "\tTxnscript.b: Modify data"error_check_good db_put [$db put -txn $child $key $data] 0set gfd [open $gidfile w+]set gid [make_gid txnscript:$parent]puts $gfd $gidputs "\tTxnscript.c: Prepare parent only"error_check_good txn_prepare:$parent [$parent prepare $gid] 0close $gfdputs "\tTxnscript.d: Check child handle"set stat [catch {$child abort} ret]error_check_good child_handle $stat 1error_check_good child_h2 [is_substr $ret "invalid command name"] 1## We do not close the db or env, but exit with the txns outstanding.#puts "\tTxnscript completed successfully"flush stdout

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -