blob: 47bd4bb02a736789435199fe45441ff4ced2c857 (
plain)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
/*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 2010, 2012 Oracle and/or its affiliates. All rights reserved.
*
* $Id$
*/
DBPRIVATE
PREFIX __heap
INCLUDE #include "db_int.h"
INCLUDE #include "dbinc/crypto.h"
INCLUDE #include "dbinc/db_page.h"
INCLUDE #include "dbinc/db_am.h"
INCLUDE #include "dbinc/heap.h"
INCLUDE #include "dbinc/txn.h"
INCLUDE
/*
* addrem -- Add or remove an entry from a heap db.
*
* opcode: identifies if this is an add or delete.
* fileid: file identifier of the file being modified.
* pgno: page number.
* indx: location at which to insert or delete.
* nbytes: number of bytes added/removed to/from the page.
* hdr: header for the data item.
* dbt: data that is to be added or deleted.
* pagelsn: former lsn of the page.
*/
BEGIN addrem 49 151
ARG opcode u_int32_t lu
DB fileid int32_t ld
ARG pgno db_pgno_t lu
ARG indx u_int32_t lu
ARG nbytes u_int32_t lu
DBT hdr DBT s
DBT dbt DBT s
POINTER pagelsn DB_LSN * lu
END
/*
* pg_alloc: used to record allocating a new page in a heap database.
*
* meta_lsn: the lsn of the metadata page
* meta_pgno the metadata page
* page_lsn: the allocated page's original lsn.
* pgno: the page allocated.
* ptype: the type of the page allocated.
* last_pgno: the last page in the file after this op (4.3+).
*/
BEGIN pg_alloc 49 152
DB fileid int32_t ld
POINTER meta_lsn DB_LSN * lu
ARG meta_pgno db_pgno_t lu
ARG pgno db_pgno_t lu
ARG ptype u_int32_t lu
ARG last_pgno db_pgno_t lu
END
/*
* trunc_meta -- Used to record truncation of a heap database's meta page
*
* fileid: file identifier of the file being modified.
* pgno: page number.
* last_pgno: value of last_pgno on meta page
* key_count: value of key_count on meta page
* record_count: value of record_count on meta page
* curregion: value of curregion on meta page
* nregions: value of nregions on meta page
* pagelsn: former lsn of the page.
*/
BEGIN trunc_meta 49 153
DB fileid int32_t ld
ARG pgno db_pgno_t lu
ARG last_pgno u_int32_t lu
ARG key_count u_int32_t lu
ARG record_count u_int32_t lu
ARG curregion u_int32_t lu
ARG nregions u_int32_t lu
POINTER pagelsn DB_LSN * lu
END
/*
* trunc_page -- Used to record truncation of a heap database's region page
*
* fileid: file identifier of the file being modified.
* pgno: page number.
* old_data: the contents of the page before truncation
* pagelsn: former lsn of the page.
*/
BEGIN trunc_page 49 154
DB fileid int32_t ld
ARG pgno db_pgno_t lu
DBT old_data DBT s
ARG is_region u_int32_t lu
POINTER pagelsn DB_LSN * lu
END
|