summaryrefslogtreecommitdiff
path: root/bdb/db_printlog/status.awk
blob: 42e24b078b9dfde1572e1aa341c609afdf63c91c (plain)
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
# $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("%s\t%s\n",
		    txns[i], status[txns[i]] == 1 ? "ABORT" : "COMMIT");
	}
}