summary refs log tree commit diff
path: root/db2/log/log.src
diff options
context:
space:
mode:
Diffstat (limited to 'db2/log/log.src')
-rw-r--r--db2/log/log.src53
1 files changed, 53 insertions, 0 deletions
diff --git a/db2/log/log.src b/db2/log/log.src
new file mode 100644
index 0000000000..9f4829179b
--- /dev/null
+++ b/db2/log/log.src
@@ -0,0 +1,53 @@
+/*-
+ * See the file LICENSE for redistribution information.
+ *
+ * Copyright (c) 1996, 1997
+ *	Sleepycat Software.  All rights reserved.
+ *
+ *	@(#)log.src	10.3 (Sleepycat) 8/20/97
+ *
+ * This is the source file used to create the logging functions for the
+ * log package.  Each access method (or set of routines wishing to register
+ * record types with the transaction system) should have a file like this.
+ * Each type of log record and its parameters is defined.  The basic
+ * format of a record definition is:
+ *
+ * BEGIN	<RECORD_TYPE>
+ * ARG|STRING|POINTER	<variable name>	<variable type> <printf format>
+ * ...
+ * END
+ * ARG the argument is a simple parameter of the type *	specified.
+ * DBT the argument is a DBT (db.h) containing a length and pointer.
+ * PTR the argument is a pointer to the data type specified; the entire
+ *     type should be logged.
+ *
+ * There are a set of shell scripts of the form xxx.sh that generate c
+ * code and or h files to process these.  (This is probably better done
+ * in a single PERL script, but for now, this works.)
+ *
+ * The DB recovery system requires the following three fields appear in
+ * every record, and will assign them to the per-record-type structures
+ * as well as making them the first parameters to the appropriate logging
+ * call.
+ * rectype:	record-type, identifies the structure and log/read call
+ * txnid:	transaction id, a DBT in this implementation
+ * prev:	the last LSN for this transaction
+ */
+
+/*
+ * Use the argument of PREFIX as the prefix for all record types,
+ * routines, id numbers, etc.
+ */
+PREFIX	log
+
+/* Used for registering new name/id translations. */
+BEGIN	register
+DBT	name		DBT		s
+DBT	uid		DBT		s
+ARG	id		u_int32_t	lu
+ARG	ftype		DBTYPE		lx
+END
+
+BEGIN	unregister
+ARG	id		u_int32_t	lu
+END