status.awk
上传用户:tsgydb
上传日期:2007-04-14
资源大小:10674k
文件大小:0k
- # $Id: status.awk,v 10.2 1999/11/21 18:01:43 bostic Exp $
- #
- # Read through db_printlog output and list all the transactions encountered
- # and whether they commited or aborted.
- #
- # 1 = started
- # 2 = commited
- BEGIN {
- cur_txn = 0
- }
- /^[/{
- if (status[$5] == 0) {
- status[$5] = 1;
- txns[cur_txn] = $5;
- cur_txn++;
- }
- }
- /txn_regop/ {
- status[$5] = 2
- }
- END {
- for (i = 0; i < cur_txn; i++) {
- printf("%st%sn",
- txns[i], status[txns[i]] == 1 ? "ABORT" : "COMMIT");
- }
- }