2 * See the file LICENSE for redistribution information.
4 * Copyright (c) 1996-2009 Oracle. All rights reserved.
12 INCLUDE #include "db_int.h"
13 INCLUDE #include "dbinc/crypto.h"
14 INCLUDE #include "dbinc/db_page.h"
15 INCLUDE #include "dbinc/db_dispatch.h"
16 INCLUDE #include "dbinc/db_am.h"
17 INCLUDE #include "dbinc/lock.h"
18 INCLUDE #include "dbinc/log.h"
19 INCLUDE #include "dbinc/txn.h"
23 * This is the standard log operation for commit.
24 * Note that we are using an int32_t for the timestamp. This means that
25 * in 2039 we will need to deprecate this log record and create one that
26 * either changes the Epoch or has a 64-bit offset.
27 * NOTE: The opcode MUST be the first argument in these records, because
28 * the force_abort code overwrites it with an ABORT should the write to
31 * Environment ID of this operation (4.4+).
33 BEGIN_COMPAT regop 42 10
34 ARG opcode u_int32_t lu
35 TIME timestamp int32_t ld
40 ARG opcode u_int32_t lu
41 TIME timestamp int32_t ld
42 ARG envid u_int32_t lu
47 * This is the checkpoint record. It contains the lsn that the checkpoint
48 * guarantees and a pointer to the last checkpoint so we can walk backwards
52 * The lsn in the log of the most recent point at which all begun
53 * transactions have been aborted. This is the point for which
54 * the checkpoint is relevant.
56 * The previous checkpoint.
58 * See comment in commit about timestamps.
60 * Environment ID of this checkpoint (4.3+).
62 * Persistent replication generation number (4.2-4.5 only).
63 * Renamed to 'spare' in 4.6.
65 BEGIN_COMPAT ckp 42 11
66 POINTER ckp_lsn DB_LSN * lu
67 POINTER last_ckp DB_LSN * lu
68 TIME timestamp int32_t ld
69 ARG rep_gen u_int32_t lu
73 POINTER ckp_lsn DB_LSN * lu
74 POINTER last_ckp DB_LSN * lu
75 TIME timestamp int32_t ld
76 ARG envid u_int32_t lu
77 ARG spare u_int32_t lu
81 * This is the (new) log operation for a child commit. It is
82 * logged as a record in the PARENT. The child field contains
83 * the transaction ID of the child committing and the c_lsn is
84 * the last LSN of the child's log trail.
87 ARG child u_int32_t lx
88 POINTER c_lsn DB_LSN * lu
93 * This is the standard log operation for prepare.
94 * NOTE: The opcode MUST be the first argument in these records, because
95 * the force_abort code overwrites it with an ABORT should the write to
98 BEGIN_COMPAT xa_regop 42 13
99 ARG opcode u_int32_t lu
101 ARG formatID int32_t ld
102 ARG gtrid u_int32_t lu
103 ARG bqual u_int32_t lu
104 POINTER begin_lsn DB_LSN * lu
109 ARG opcode u_int32_t lu
111 POINTER begin_lsn DB_LSN * lu
116 * Log the fact that we are recycling txnids.