summaryrefslogtreecommitdiff
path: root/bdb/db_printlog/status.awk
diff options
context:
space:
mode:
Diffstat (limited to 'bdb/db_printlog/status.awk')
-rw-r--r--bdb/db_printlog/status.awk26
1 files changed, 26 insertions, 0 deletions
diff --git a/bdb/db_printlog/status.awk b/bdb/db_printlog/status.awk
new file mode 100644
index 00000000000..42e24b078b9
--- /dev/null
+++ b/bdb/db_printlog/status.awk
@@ -0,0 +1,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");
+ }
+}