summaryrefslogtreecommitdiff
path: root/bdb/db_printlog
diff options
context:
space:
mode:
Diffstat (limited to 'bdb/db_printlog')
-rw-r--r--bdb/db_printlog/README34
-rw-r--r--bdb/db_printlog/commit.awk7
-rw-r--r--bdb/db_printlog/count.awk9
-rw-r--r--bdb/db_printlog/db_printlog.c360
-rw-r--r--bdb/db_printlog/dbname.awk79
-rw-r--r--bdb/db_printlog/fileid.awk37
-rw-r--r--bdb/db_printlog/logstat.awk36
-rw-r--r--bdb/db_printlog/pgno.awk47
-rw-r--r--bdb/db_printlog/range.awk27
-rw-r--r--bdb/db_printlog/rectype.awk27
-rw-r--r--bdb/db_printlog/status.awk46
-rw-r--r--bdb/db_printlog/txn.awk34
12 files changed, 0 insertions, 743 deletions
diff --git a/bdb/db_printlog/README b/bdb/db_printlog/README
deleted file mode 100644
index d59f4c77f55..00000000000
--- a/bdb/db_printlog/README
+++ /dev/null
@@ -1,34 +0,0 @@
-# $Id: README,v 10.6 2002/06/20 14:52:54 bostic Exp $
-
-Berkeley DB log dump utility. This utility dumps out a DB log in human
-readable form, a record at a time, to assist in recovery and transaction
-abort debugging.
-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-commit.awk Output transaction ID of committed transactions.
-
-count.awk Print out the number of log records for transactions
- that we encountered.
-
-dbname.awk Take a comma-separated list of database names and spit
- out all the log records that affect those databases.
-
-fileid.awk Take a comma-separated list of file numbers and spit out
- all the log records that affect those file numbers.
-
-logstat.awk Display log record count/size statistics.
-
-pgno.awk Take a comma-separated list of page numbers and spit
- out all the log records that affect those page numbers.
-
-range.awk Print out a range of the log.
-
-rectype.awk Print out a range of the log -- command line should
- set RECTYPE to the a comma separated list of the
- rectypes (or partial strings of rectypes) sought.
-
-status.awk Read through db_printlog output and list the transactions
- encountered, and whether they commited or aborted.
-
-txn.awk Print out all the records for a comma-separated list of
- transaction IDs.
diff --git a/bdb/db_printlog/commit.awk b/bdb/db_printlog/commit.awk
deleted file mode 100644
index 66391d3fb63..00000000000
--- a/bdb/db_printlog/commit.awk
+++ /dev/null
@@ -1,7 +0,0 @@
-# $Id: commit.awk,v 10.2 1999/11/21 18:01:42 bostic Exp $
-#
-# Output tid of committed transactions.
-
-/txn_regop/ {
- print $5
-}
diff --git a/bdb/db_printlog/count.awk b/bdb/db_printlog/count.awk
deleted file mode 100644
index 1d5a291950f..00000000000
--- a/bdb/db_printlog/count.awk
+++ /dev/null
@@ -1,9 +0,0 @@
-# $Id: count.awk,v 10.2 1999/11/21 18:01:42 bostic Exp $
-#
-# Print out the number of log records for transactions that we
-# encountered.
-
-/^\[/{
- if ($5 != 0)
- print $5
-}
diff --git a/bdb/db_printlog/db_printlog.c b/bdb/db_printlog/db_printlog.c
deleted file mode 100644
index af6d00d593a..00000000000
--- a/bdb/db_printlog/db_printlog.c
+++ /dev/null
@@ -1,360 +0,0 @@
-/*-
- * See the file LICENSE for redistribution information.
- *
- * Copyright (c) 1996-2002
- * Sleepycat Software. All rights reserved.
- */
-
-#include "db_config.h"
-
-#ifndef lint
-static const char copyright[] =
- "Copyright (c) 1996-2002\nSleepycat Software Inc. All rights reserved.\n";
-static const char revid[] =
- "$Id: db_printlog.c,v 11.52 2002/08/08 03:50:38 bostic Exp $";
-#endif
-
-#ifndef NO_SYSTEM_INCLUDES
-#include <sys/types.h>
-
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#endif
-
-#include "db_int.h"
-#include "dbinc/db_page.h"
-#include "dbinc/btree.h"
-#include "dbinc/fop.h"
-#include "dbinc/hash.h"
-#include "dbinc/log.h"
-#include "dbinc/qam.h"
-#include "dbinc/rep.h"
-#include "dbinc/txn.h"
-
-int main __P((int, char *[]));
-int usage __P((void));
-int version_check __P((const char *));
-int print_app_record __P((DB_ENV *, DBT *, DB_LSN *, db_recops));
-int open_rep_db __P((DB_ENV *, DB **, DBC **));
-
-int
-main(argc, argv)
- int argc;
- char *argv[];
-{
- extern char *optarg;
- extern int optind;
- const char *progname = "db_printlog";
- DB *dbp;
- DBC *dbc;
- DB_ENV *dbenv;
- DB_LOGC *logc;
- int (**dtab) __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
- size_t dtabsize;
- DBT data, keydbt;
- DB_LSN key;
- int ch, e_close, exitval, nflag, rflag, ret, repflag;
- char *home, *passwd;
-
- if ((ret = version_check(progname)) != 0)
- return (ret);
-
- dbp = NULL;
- dbc = NULL;
- logc = NULL;
- e_close = exitval = nflag = rflag = repflag = 0;
- home = passwd = NULL;
- dtabsize = 0;
- dtab = NULL;
- while ((ch = getopt(argc, argv, "h:NP:rRV")) != EOF)
- switch (ch) {
- case 'h':
- home = optarg;
- break;
- case 'N':
- nflag = 1;
- break;
- case 'P':
- passwd = strdup(optarg);
- memset(optarg, 0, strlen(optarg));
- if (passwd == NULL) {
- fprintf(stderr, "%s: strdup: %s\n",
- progname, strerror(errno));
- return (EXIT_FAILURE);
- }
- break;
- case 'r':
- rflag = 1;
- break;
- case 'R':
- repflag = 1;
- break;
- case 'V':
- printf("%s\n", db_version(NULL, NULL, NULL));
- return (EXIT_SUCCESS);
- case '?':
- default:
- return (usage());
- }
- argc -= optind;
- argv += optind;
-
- if (argc > 0)
- return (usage());
-
- /* Handle possible interruptions. */
- __db_util_siginit();
-
- /*
- * Create an environment object and initialize it for error
- * reporting.
- */
- if ((ret = db_env_create(&dbenv, 0)) != 0) {
- fprintf(stderr,
- "%s: db_env_create: %s\n", progname, db_strerror(ret));
- goto shutdown;
- }
- e_close = 1;
-
- dbenv->set_errfile(dbenv, stderr);
- dbenv->set_errpfx(dbenv, progname);
-
- if (nflag) {
- if ((ret = dbenv->set_flags(dbenv, DB_NOLOCKING, 1)) != 0) {
- dbenv->err(dbenv, ret, "set_flags: DB_NOLOCKING");
- goto shutdown;
- }
- if ((ret = dbenv->set_flags(dbenv, DB_NOPANIC, 1)) != 0) {
- dbenv->err(dbenv, ret, "set_flags: DB_NOPANIC");
- goto shutdown;
- }
- }
-
- if (passwd != NULL && (ret = dbenv->set_encrypt(dbenv,
- passwd, DB_ENCRYPT_AES)) != 0) {
- dbenv->err(dbenv, ret, "set_passwd");
- goto shutdown;
- }
-
- /*
- * Set up an app-specific dispatch function so that we can gracefully
- * handle app-specific log records.
- */
- if ((ret = dbenv->set_app_dispatch(dbenv, print_app_record)) != 0) {
- dbenv->err(dbenv, ret, "app_dispatch");
- goto shutdown;
- }
-
- /*
- * An environment is required, but as all we're doing is reading log
- * files, we create one if it doesn't already exist. If we create
- * it, create it private so it automatically goes away when we're done.
- * If we are reading the replication database, do not open the env
- * with logging, because we don't want to log the opens.
- */
- if (repflag) {
- if ((ret = dbenv->open(dbenv, home,
- DB_INIT_MPOOL | DB_USE_ENVIRON, 0)) != 0 &&
- (ret = dbenv->open(dbenv, home,
- DB_CREATE | DB_INIT_MPOOL | DB_PRIVATE | DB_USE_ENVIRON, 0))
- != 0) {
- dbenv->err(dbenv, ret, "open");
- goto shutdown;
- }
- } else if ((ret = dbenv->open(dbenv, home,
- DB_JOINENV | DB_USE_ENVIRON, 0)) != 0 &&
- (ret = dbenv->open(dbenv, home,
- DB_CREATE | DB_INIT_LOG | DB_PRIVATE | DB_USE_ENVIRON, 0)) != 0) {
- dbenv->err(dbenv, ret, "open");
- goto shutdown;
- }
-
- /* Initialize print callbacks. */
- if ((ret = __bam_init_print(dbenv, &dtab, &dtabsize)) != 0 ||
- (ret = __dbreg_init_print(dbenv, &dtab, &dtabsize)) != 0 ||
- (ret = __crdel_init_print(dbenv, &dtab, &dtabsize)) != 0 ||
- (ret = __db_init_print(dbenv, &dtab, &dtabsize)) != 0 ||
- (ret = __fop_init_print(dbenv, &dtab, &dtabsize)) != 0 ||
- (ret = __qam_init_print(dbenv, &dtab, &dtabsize)) != 0 ||
- (ret = __ham_init_print(dbenv, &dtab, &dtabsize)) != 0 ||
- (ret = __txn_init_print(dbenv, &dtab, &dtabsize)) != 0) {
- dbenv->err(dbenv, ret, "callback: initialization");
- goto shutdown;
- }
-
- /* Allocate a log cursor. */
- if (repflag) {
- if ((ret = open_rep_db(dbenv, &dbp, &dbc)) != 0)
- goto shutdown;
- } else if ((ret = dbenv->log_cursor(dbenv, &logc, 0)) != 0) {
- dbenv->err(dbenv, ret, "DB_ENV->log_cursor");
- goto shutdown;
- }
-
- memset(&data, 0, sizeof(data));
- memset(&keydbt, 0, sizeof(keydbt));
- while (!__db_util_interrupted()) {
- if (repflag) {
- ret = dbc->c_get(dbc,
- &keydbt, &data, rflag ? DB_PREV : DB_NEXT);
- if (ret == 0)
- key = ((REP_CONTROL *)keydbt.data)->lsn;
- } else
- ret = logc->get(logc,
- &key, &data, rflag ? DB_PREV : DB_NEXT);
- if (ret != 0) {
- if (ret == DB_NOTFOUND)
- break;
- dbenv->err(dbenv,
- ret, repflag ? "DB_LOGC->get" : "DBC->get");
- goto shutdown;
- }
-
- ret = __db_dispatch(dbenv,
- dtab, dtabsize, &data, &key, DB_TXN_PRINT, NULL);
-
- /*
- * XXX
- * Just in case the underlying routines don't flush.
- */
- (void)fflush(stdout);
-
- if (ret != 0) {
- dbenv->err(dbenv, ret, "tx: dispatch");
- goto shutdown;
- }
- }
-
- if (0) {
-shutdown: exitval = 1;
- }
- if (logc != NULL && (ret = logc->close(logc, 0)) != 0)
- exitval = 1;
-
- if (dbc != NULL && (ret = dbc->c_close(dbc)) != 0)
- exitval = 1;
-
- if (dbp != NULL && (ret = dbp->close(dbp, 0)) != 0)
- exitval = 1;
-
- /*
- * The dtab is allocated by __db_add_recovery (called by *_init_print)
- * using the library malloc function (__os_malloc). It thus needs to be
- * freed using the corresponding free (__os_free).
- */
- if (dtab != NULL)
- __os_free(dbenv, dtab);
- if (e_close && (ret = dbenv->close(dbenv, 0)) != 0) {
- exitval = 1;
- fprintf(stderr,
- "%s: dbenv->close: %s\n", progname, db_strerror(ret));
- }
-
- /* Resend any caught signal. */
- __db_util_sigresend();
-
- return (exitval == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
-}
-
-int
-usage()
-{
- fprintf(stderr, "%s\n",
- "usage: db_printlog [-NrV] [-h home] [-P password]");
- return (EXIT_FAILURE);
-}
-
-int
-version_check(progname)
- const char *progname;
-{
- int v_major, v_minor, v_patch;
-
- /* Make sure we're loaded with the right version of the DB library. */
- (void)db_version(&v_major, &v_minor, &v_patch);
- if (v_major != DB_VERSION_MAJOR ||
- v_minor != DB_VERSION_MINOR || v_patch != DB_VERSION_PATCH) {
- fprintf(stderr,
- "%s: version %d.%d.%d doesn't match library version %d.%d.%d\n",
- progname, DB_VERSION_MAJOR, DB_VERSION_MINOR,
- DB_VERSION_PATCH, v_major, v_minor, v_patch);
- return (EXIT_FAILURE);
- }
- return (0);
-}
-
-/* Print an unknown, application-specific log record as best we can. */
-int
-print_app_record(dbenv, dbt, lsnp, op)
- DB_ENV *dbenv;
- DBT *dbt;
- DB_LSN *lsnp;
- db_recops op;
-{
- int ch;
- u_int32_t i, rectype;
-
- DB_ASSERT(op == DB_TXN_PRINT);
- COMPQUIET(dbenv, NULL);
-
- /*
- * Fetch the rectype, which always must be at the beginning of the
- * record (if dispatching is to work at all).
- */
- memcpy(&rectype, dbt->data, sizeof(rectype));
-
- /*
- * Applications may wish to customize the output here based on the
- * rectype. We just print the entire log record in the generic
- * mixed-hex-and-printable format we use for binary data.
- */
- printf("[%lu][%lu]application specific record: rec: %lu\n",
- (u_long)lsnp->file, (u_long)lsnp->offset, (u_long)rectype);
- printf("\tdata: ");
- for (i = 0; i < dbt->size; i++) {
- ch = ((u_int8_t *)dbt->data)[i];
- printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
- }
- printf("\n\n");
-
- return (0);
-}
-
-int
-open_rep_db(dbenv, dbpp, dbcp)
- DB_ENV *dbenv;
- DB **dbpp;
- DBC **dbcp;
-{
- int ret;
-
- DB *dbp;
- *dbpp = NULL;
- *dbcp = NULL;
-
- if ((ret = db_create(dbpp, dbenv, 0)) != 0) {
- dbenv->err(dbenv, ret, "db_create");
- return (ret);
- }
-
- dbp = *dbpp;
- if ((ret =
- dbp->open(dbp, NULL, "__db.rep.db", NULL, DB_BTREE, 0, 0)) != 0) {
- dbenv->err(dbenv, ret, "DB->open");
- goto err;
- }
-
- if ((ret = dbp->cursor(dbp, NULL, dbcp, 0)) != 0) {
- dbenv->err(dbenv, ret, "DB->cursor");
- goto err;
- }
-
- return (0);
-
-err: if (*dbpp != NULL)
- (void)(*dbpp)->close(*dbpp, 0);
- return (ret);
-}
diff --git a/bdb/db_printlog/dbname.awk b/bdb/db_printlog/dbname.awk
deleted file mode 100644
index 47955994579..00000000000
--- a/bdb/db_printlog/dbname.awk
+++ /dev/null
@@ -1,79 +0,0 @@
-# $Id: dbname.awk,v 1.5 2002/05/07 05:45:51 ubell Exp $
-#
-# Take a comma-separated list of database names and spit out all the
-# log records that affect those databases.
-
-NR == 1 {
- nfiles = 0
- while ((ndx = index(DBNAME, ",")) != 0) {
- filenames[nfiles] = substr(DBNAME, 1, ndx - 1) 0;
- DBNAME = substr(DBNAME, ndx + 1, length(DBNAME) - ndx);
- files[nfiles] = -1
- nfiles++
- }
- filenames[nfiles] = DBNAME 0;
- files[nfiles] = -1
- myfile = -1;
-}
-
-/^\[.*dbreg_register/ {
- register = 1;
-}
-/opcode:/ {
- if (register == 1) {
- if ($2 == 1)
- register = 3;
- else
- register = $2;
- }
-}
-/name:/ {
- if (register >= 2) {
- for (i = 0; i <= nfiles; i++) {
- if ($2 == filenames[i]) {
- if (register == 2) {
- printme = 0;
- myfile = -1;
- files[i] = -1;
- } else {
- myfile = i;
- }
- break;
- }
- }
- }
- register = 0;
-}
-/fileid:/{
- if (myfile != -1) {
- files[myfile] = $2;
- printme = 1;
- register = 0;
- myfile = -1;
- } else
- for (i = 0; i <= nfiles; i++)
- if ($2 == files[i]) {
- printme = 1
- break;
- }
-}
-
-/^\[/{
- if (printme == 1) {
- printf("%s\n", rec);
- printme = 0
- }
- rec = "";
-
- rec = $0
-}
-
-TXN == 1 && /txn_regop/ {printme = 1}
-/^ /{
- rec = sprintf("%s\n%s", rec, $0);
-}
-
-END {
- if (printme == 1)
- printf("%s\n", rec);
-}
diff --git a/bdb/db_printlog/fileid.awk b/bdb/db_printlog/fileid.awk
deleted file mode 100644
index 020644039ab..00000000000
--- a/bdb/db_printlog/fileid.awk
+++ /dev/null
@@ -1,37 +0,0 @@
-# $Id: fileid.awk,v 10.4 2000/07/17 22:07:17 ubell Exp $
-#
-# Take a comma-separated list of file numbers and spit out all the
-# log records that affect those file numbers.
-
-NR == 1 {
- nfiles = 0
- while ((ndx = index(FILEID, ",")) != 0) {
- files[nfiles] = substr(FILEID, 1, ndx - 1);
- FILEID = substr(FILEID, ndx + 1, length(FILEID) - ndx);
- nfiles++
- }
- files[nfiles] = FILEID;
-}
-
-/^\[/{
- if (printme == 1) {
- printf("%s\n", rec);
- printme = 0
- }
- rec = "";
-
- rec = $0
-}
-/^ /{
- rec = sprintf("%s\n%s", rec, $0);
-}
-/fileid/{
- for (i = 0; i <= nfiles; i++)
- if ($2 == files[i])
- printme = 1
-}
-
-END {
- if (printme == 1)
- printf("%s\n", rec);
-}
diff --git a/bdb/db_printlog/logstat.awk b/bdb/db_printlog/logstat.awk
deleted file mode 100644
index 1009343eba4..00000000000
--- a/bdb/db_printlog/logstat.awk
+++ /dev/null
@@ -1,36 +0,0 @@
-# $Id: logstat.awk,v 1.1 2002/05/10 15:19:13 bostic Exp $
-#
-# Output accumulated log record count/size statistics.
-BEGIN {
- l_file = 0;
- l_offset = 0;
-}
-
-/^\[/{
- gsub("[][: ]", " ", $1)
- split($1, a)
-
- if (a[1] == l_file) {
- l[a[3]] += a[2] - l_offset
- ++n[a[3]]
- } else
- ++s[a[3]]
-
- l_file = a[1]
- l_offset = a[2]
-}
-
-END {
- # We can't figure out the size of the first record in each log file,
- # use the average for other records we found as an estimate.
- for (i in s)
- if (s[i] != 0 && n[i] != 0) {
- l[i] += s[i] * (l[i]/n[i])
- n[i] += s[i]
- delete s[i]
- }
- for (i in l)
- printf "%s: %d (n: %d, avg: %.2f)\n", i, l[i], n[i], l[i]/n[i]
- for (i in s)
- printf "%s: unknown (n: %d, unknown)\n", i, s[i]
-}
diff --git a/bdb/db_printlog/pgno.awk b/bdb/db_printlog/pgno.awk
deleted file mode 100644
index 289fa853bc4..00000000000
--- a/bdb/db_printlog/pgno.awk
+++ /dev/null
@@ -1,47 +0,0 @@
-# $Id: pgno.awk,v 10.3 2000/07/17 22:07:17 ubell Exp $
-#
-# Take a comma-separated list of page numbers and spit out all the
-# log records that affect those page numbers.
-
-NR == 1 {
- npages = 0
- while ((ndx = index(PGNO, ",")) != 0) {
- pgno[npages] = substr(PGNO, 1, ndx - 1);
- PGNO = substr(PGNO, ndx + 1, length(PGNO) - ndx);
- npages++
- }
- pgno[npages] = PGNO;
-}
-
-/^\[/{
- if (printme == 1) {
- printf("%s\n", rec);
- printme = 0
- }
- rec = "";
-
- rec = $0
-}
-/^ /{
- rec = sprintf("%s\n%s", rec, $0);
-}
-/pgno/{
- for (i = 0; i <= npages; i++)
- if ($2 == pgno[i])
- printme = 1
-}
-/right/{
- for (i = 0; i <= npages; i++)
- if ($2 == pgno[i])
- printme = 1
-}
-/left/{
- for (i = 0; i <= npages; i++)
- if ($2 == pgno[i])
- printme = 1
-}
-
-END {
- if (printme == 1)
- printf("%s\n", rec);
-}
diff --git a/bdb/db_printlog/range.awk b/bdb/db_printlog/range.awk
deleted file mode 100644
index 7abb410b40f..00000000000
--- a/bdb/db_printlog/range.awk
+++ /dev/null
@@ -1,27 +0,0 @@
-# $Id: range.awk,v 10.2 1999/11/21 18:01:42 bostic Exp $
-#
-# Print out a range of the log
-
-/^\[/{
- l = length($1) - 1;
- i = index($1, "]");
- file = substr($1, 2, i - 2);
- file += 0;
- start = i + 2;
- offset = substr($1, start, l - start + 1);
- i = index(offset, "]");
- offset = substr($1, start, i - 1);
- offset += 0;
-
- if ((file == START_FILE && offset >= START_OFFSET || file > START_FILE)\
- && (file < END_FILE || (file == END_FILE && offset < END_OFFSET)))
- printme = 1
- else if (file == END_FILE && offset > END_OFFSET || file > END_FILE)
- exit
- else
- printme = 0
-}
-{
- if (printme == 1)
- print $0
-}
diff --git a/bdb/db_printlog/rectype.awk b/bdb/db_printlog/rectype.awk
deleted file mode 100644
index 7f7b2f5ee15..00000000000
--- a/bdb/db_printlog/rectype.awk
+++ /dev/null
@@ -1,27 +0,0 @@
-# $Id: rectype.awk,v 11.3 2000/07/17 22:00:49 ubell Exp $
-#
-# Print out a range of the log
-# Command line should set RECTYPE to the a comma separated list
-# of the rectypes (or partial strings of rectypes) sought.
-NR == 1 {
- ntypes = 0
- while ((ndx = index(RECTYPE, ",")) != 0) {
- types[ntypes] = substr(RECTYPE, 1, ndx - 1);
- RECTYPE = substr(RECTYPE, ndx + 1, length(RECTYPE) - ndx);
- ntypes++
- }
- types[ntypes] = RECTYPE;
-}
-
-/^\[/{
- printme = 0
- for (i = 0; i <= ntypes; i++)
- if (index($1, types[i]) != 0) {
- printme = 1
- break;
- }
-}
-{
- if (printme == 1)
- print $0
-}
diff --git a/bdb/db_printlog/status.awk b/bdb/db_printlog/status.awk
deleted file mode 100644
index 13df0b6194a..00000000000
--- a/bdb/db_printlog/status.awk
+++ /dev/null
@@ -1,46 +0,0 @@
-# $Id: status.awk,v 10.3 2002/04/11 01:35:24 margo Exp $
-#
-# Read through db_printlog output and list all the transactions encountered
-# and whether they commited or aborted.
-#
-# 1 = started
-# 2 = commited
-# 3 = explicitly aborted
-# 4 = other
-BEGIN {
- cur_txn = 0
-}
-/^\[/{
- in_regop = 0
- if (status[$5] == 0) {
- status[$5] = 1;
- txns[cur_txn] = $5;
- cur_txn++;
- }
-}
-/txn_regop/ {
- txnid = $5
- in_regop = 1
-}
-/opcode:/ {
- if (in_regop == 1) {
- if ($2 == 1)
- status[txnid] = 2
- else if ($2 == 3)
- status[txnid] = 3
- else
- status[txnid] = 4
- }
-}
-END {
- for (i = 0; i < cur_txn; i++) {
- if (status[txns[i]] == 1)
- printf("%s\tABORT\n", txns[i]);
- if (status[txns[i]] == 2)
- printf("%s\tCOMMIT\n", txns[i]);
- if (status[txns[i]] == 3)
- printf("%s\tABORT\n", txns[i]);
- if (status[txns[i]] == 4)
- printf("%s\tOTHER\n", txns[i]);
- }
-}
diff --git a/bdb/db_printlog/txn.awk b/bdb/db_printlog/txn.awk
deleted file mode 100644
index be8c44e1092..00000000000
--- a/bdb/db_printlog/txn.awk
+++ /dev/null
@@ -1,34 +0,0 @@
-# $Id: txn.awk,v 10.3 2000/07/17 22:07:17 ubell Exp $
-#
-# Print out all the records for a comma-separated list of transaction ids.
-NR == 1 {
- ntxns = 0
- while ((ndx = index(TXN, ",")) != 0) {
- txn[ntxns] = substr(TXN, 1, ndx - 1);
- TXN = substr(TXN, ndx + 1, length(TXN) - ndx);
- ntxns++
- }
- txn[ntxns] = TXN;
-}
-
-/^\[/{
- if (printme == 1) {
- printf("%s\n", rec);
- printme = 0
- }
- rec = "";
-
- for (i = 0; i <= ntxns; i++)
- if (txn[i] == $5) {
- rec = $0
- printme = 1
- }
-}
-/^ /{
- rec = sprintf("%s\n%s", rec, $0);
-}
-
-END {
- if (printme == 1)
- printf("%s\n", rec);
-}