about summary refs log tree commit diff
path: root/db2/log/log.src
blob: 9f4829179b491fcfeb5cf5bc38ab2ee0ddae896a (plain) (blame)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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