summaryrefslogtreecommitdiff
path: root/bdb/db/crdel.src
blob: 17c061d6887271be7f0a6814c8d1558bf6d353a2 (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
102
103
/*-
 * See the file LICENSE for redistribution information.
 *
 * Copyright (c) 1996, 1997, 1998, 1999, 2000
 *	Sleepycat Software.  All rights reserved.
 *
 *	$Id: crdel.src,v 11.12 2000/12/12 17:41:48 bostic Exp $
 */

PREFIX	crdel

INCLUDE	#include "db_config.h"
INCLUDE
INCLUDE #ifndef NO_SYSTEM_INCLUDES
INCLUDE #include <sys/types.h>
INCLUDE
INCLUDE #include <ctype.h>
INCLUDE #include <errno.h>
INCLUDE #include <string.h>
INCLUDE #endif
INCLUDE
INCLUDE #include "db_int.h"
INCLUDE #include "db_page.h"
INCLUDE #include "db_dispatch.h"
INCLUDE #include "db_am.h"
INCLUDE #include "txn.h"
INCLUDE

/*
 * Fileopen -- log a potential file create operation
 *
 * name: filename
 * subname: sub database name
 * mode: file system mode
 */
BEGIN fileopen		141
DBT	name		DBT		s
ARG	mode		u_int32_t	o
END

/*
 * Metasub: log the creation of a subdatabase meta data page.
 *
 * fileid: identifies the file being acted upon.
 * pgno: page number on which to write this meta-data page
 * page: the actual meta-data page
 * lsn: lsn of the page.
 */
BEGIN metasub		142
ARG	fileid		int32_t		ld
ARG	pgno		db_pgno_t	d
DBT	page		DBT		s
POINTER	lsn		DB_LSN *	lu
END

/*
 * Metapage: log the creation of a meta data page for a new file.
 *
 * fileid: identifies the file being acted upon.
 * name: file containing the page.
 * pgno: page number on which to write this meta-data page
 * page: the actual meta-data page
 */
BEGIN metapage		143
ARG	fileid		int32_t		ld
DBT	name		DBT		s
ARG	pgno		db_pgno_t	d
DBT	page		DBT		s
END

/*
 * Delete: remove a file.
 * Note that we don't need a special log record for subdatabase
 * removes, because we use normal btree operations to remove them.
 *
 * name: name of the file being removed (relative to DBHOME).
 */
DEPRECATED old_delete		144
DBT	name		DBT	s
END

/*
 * Rename: rename a file
 *   We do not need this for subdatabases
 *
 * name: name of the file being removed (relative to DBHOME).
 */
BEGIN rename		145
ARG	fileid		int32_t	ld
DBT	name		DBT		s
DBT	newname		DBT		s
END
/*
 * Delete: remove a file.
 * Note that we don't need a special log record for subdatabase
 * removes, because we use normal btree operations to remove them.
 *
 * name: name of the file being removed (relative to DBHOME).
 */
BEGIN delete		146
ARG	fileid		int32_t	ld
DBT	name		DBT		s
END