summaryrefslogtreecommitdiff
path: root/bdb/dist/s_recover
diff options
context:
space:
mode:
authorunknown <tim@threads.polyesthetic.msg>2001-03-04 19:42:05 -0500
committerunknown <tim@threads.polyesthetic.msg>2001-03-04 19:42:05 -0500
commitec6ae091617bdfdca9e65e8d3e65b950d234f676 (patch)
tree9dd732e08dba156ee3d7635caedc0dc3107ecac6 /bdb/dist/s_recover
parent87d70fb598105b64b538ff6b81eef9da626255b1 (diff)
downloadmariadb-git-ec6ae091617bdfdca9e65e8d3e65b950d234f676.tar.gz
Import changeset
Diffstat (limited to 'bdb/dist/s_recover')
-rwxr-xr-xbdb/dist/s_recover56
1 files changed, 56 insertions, 0 deletions
diff --git a/bdb/dist/s_recover b/bdb/dist/s_recover
new file mode 100755
index 00000000000..0e8b3731c77
--- /dev/null
+++ b/bdb/dist/s_recover
@@ -0,0 +1,56 @@
+#!/bin/sh -
+# $Id: s_recover,v 1.3 2000/03/30 05:24:36 krinsky Exp $
+#
+# Build the automatically generated logging/recovery files.
+
+DIR="db btree hash log qam txn"
+
+t=/tmp/__db_$$
+loglist=../test/logtrack.list
+rm -f $t
+rm -f $loglist
+
+trap 'rm -f $t; exit 1' 1 2 3 13 15
+
+# Check to make sure we haven't duplicated a log record entry, and build
+# the list of log record types that the test suite uses.
+for i in $DIR; do
+ p=none
+ for f in ../$i/*.src; do
+ # Grab the PREFIX; there should only be one per file, and
+ # so it's okay to just take the first.
+ grep '^PREFIX' $f | head -1
+ egrep '^DEPRECATED[ ]|^BEGIN[ ]' $f | \
+ awk '{print $1 "\t" $2 "\t" $3}'
+
+ done
+done > $loglist
+grep -v '^PREFIX' $loglist | awk '{print $2 "\t" $3}' | sort +1 -n | \
+ uniq -d -f 1 > $t
+[ -s $t ] && {
+ echo "DUPLICATE LOG VALUES:"
+ cat $t
+ rm -f $t
+ exit 1
+}
+rm -f $t
+
+for i in db btree hash log qam txn; do
+ for f in ../$i/*.src; do
+ subsystem=`basename $f .src`
+ header_file=../include/${subsystem}_auto.h
+ source_file=../$i/${subsystem}_auto.c
+ template_file=template/rec_${subsystem}
+ template_source=.
+
+ echo "Building $source_file, $header_file, $template_file"
+ rm -f $header_file $source_file $template_file
+ awk -f gen_rec.awk \
+ -v subsystem=$subsystem \
+ -v source_file=$source_file \
+ -v header_file=$header_file \
+ -v template_file=$template_file \
+ -v template_dir=. < $f
+ chmod 444 $header_file $source_file $template_file
+ done
+done