head 1.2; access; symbols RPM_4_2_1:1.1.1.5 RPM_4_2:1.1.1.5 RPM_4_1_1:1.1.1.5 RPM_4_1:1.1.1.4 RPM_4_0_5:1.1.1.3 RPM_4_0_4:1.1.1.2 RPM_4_0_3:1.1.1.1 RPM:1.1.1; locks; strict; comment @# @; 1.2 date 2008.01.02.09.52.56; author rse; state dead; branches; next 1.1; commitid z4cpSiAhOCXk5PLs; 1.1 date 2001.07.23.20.45.36; author rse; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2001.07.23.20.45.36; author rse; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2002.01.08.00.30.08; author rse; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2003.01.18.13.48.57; author rse; state Exp; branches; next 1.1.1.4; 1.1.1.4 date 2001.12.06.00.08.00; author rse; state Exp; branches; next 1.1.1.5; 1.1.1.5 date 2003.01.18.14.04.57; author rse; state Exp; branches; next ; desc @@ 1.2 log @remove the ancient RPM 4.2.1 source tree copy @ text @
memp_fget |
![]() ![]() |
#include <db.h>int memp_fget(DB_MPOOLFILE *mpf, db_pgno_t *pgnoaddr, u_int32_t flags, void **pagep);
The memp_fget function copies a pointer to the page with the page number specified by pgnoaddr, from the source file in the DB_MPOOLFILE, into the memory location to which pagep refers. If the page does not exist or cannot be retrieved, memp_fget will fail.
Page numbers begin at 0; that is, the first page in the file is page number 0, not page number 1.
The returned page is size_t type aligned.
The flags value must be set to 0 or by bitwise inclusively OR'ing together one or more of the following values:
The DB_MPOOL_CREATE, DB_MPOOL_LAST, and DB_MPOOL_NEW flags are mutually exclusive.
Fully or partially created pages have all their bytes set to 0, unless other behavior was specified when the file was opened.
All pages returned by memp_fget will be retained (that is, pinned), in the pool until a subsequent call to memp_fput.
The memp_fget function returns a non-zero error value on failure, 0 on success, and returns DB_PAGE_NOTFOUND if the requested page does not exist and DB_MPOOL_CREATE was not set.
The memp_fget function may fail and return a non-zero error for the following conditions:
The DB_MPOOL_NEW flag was set, and the source file was not opened for writing.
More than one of DB_MPOOL_CREATE, DB_MPOOL_LAST, and DB_MPOOL_NEW was set.
The memp_fget function may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions. If a catastrophic error has occurred, the memp_fget function may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way.
![]() ![]() |
Copyright Sleepycat Software @ 1.1 log @Initial revision @ text @d1 1 a1 1 @ 1.1.1.1 log @Import: RPM 4.0.3 @ text @@ 1.1.1.2 log @Import: RPM 4.0.4 @ text @d1 1 a1 1 d6 1 a6 1
The DB_MPOOLFILE->get function copies a pointer to the page with the page number specified by pgnoaddr, from the source file in the DB_MPOOLFILE, d32 1 a32 1 does not exist or cannot be retrieved, DB_MPOOLFILE->get will fail. d51 3 a53 4
Fully or partially created pages have all their bytes set to a nul byte, unless the DB_MPOOLFILE->set_clear_len function was called to specify other behavior before the file was opened.
All pages returned by DB_MPOOLFILE->get will be retained (that is, d55 1 a55 1 DB_MPOOLFILE->put. d57 1 a57 1
The DB_MPOOLFILE->get function returns a non-zero error value on failure, 0 on success, and returns DB_PAGE_NOTFOUND if the requested page does not d60 1 a60 1
The DB_MPOOLFILE->get function may fail and return a non-zero error for the following conditions: d75 2 a76 2
The DB_MPOOLFILE->get function may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions. If a catastrophic error has occurred, the DB_MPOOLFILE->get function may fail and return d82 9 a90 15 DB_ENV->memp_fcreate, DB_MPOOLFILE->close, DB_MPOOLFILE->get, DB_MPOOLFILE->open, DB_MPOOLFILE->put, DB_MPOOLFILE->set, DB_MPOOLFILE->sync, DB_ENV->memp_register, DB_MPOOLFILE->set_clear_len, DB_MPOOLFILE->set_fileid, DB_MPOOLFILE->set_ftype, DB_MPOOLFILE->set_lsn_offset, DB_MPOOLFILE->set_pgcookie, DB_ENV->memp_stat, DB_ENV->memp_sync, d92 1 a92 1 DB_ENV->memp_trickle. @ 1.1.1.3 log @Import: RPM 4.0.5 @ text @d1 2 a2 2 a3 1 d29 2 a30 2
The DB_MPOOLFILE->get method copies a pointer to the page with the page number specified by pgnoaddr, from the source file in the DB_MPOOLFILE, d52 1 a52 1 unless the DB_MPOOLFILE->set_clear_len method was called to specify other d58 1 a58 1
The DB_MPOOLFILE->get method returns a non-zero error value on failure, 0 on success, and returns DB_PAGE_NOTFOUND if the requested page does not d61 1 a61 1
The DB_MPOOLFILE->get method may fail and return a non-zero error for the following conditions: d76 4 a79 6
The DB_MPOOLFILE->get method may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions. If a catastrophic error has occurred, the DB_MPOOLFILE->get method may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way.
The DB_MPOOLFILE->get function copies a pointer to the page with the page number specified by pgnoaddr, from the source file in the DB_MPOOLFILE, d53 1 a53 1 unless the DB_MPOOLFILE->set_clear_len function was called to specify other d59 1 a59 1
The DB_MPOOLFILE->get function returns a non-zero error value on failure, 0 on success, and returns DB_PAGE_NOTFOUND if the requested page does not d62 1 a62 1
The DB_MPOOLFILE->get function may fail and return a non-zero error for the following conditions: d77 6 a82 4
The DB_MPOOLFILE->get function may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions. If a catastrophic error has occurred, the DB_MPOOLFILE->get function may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way. d84 1 a84 19 DB_ENV->set_cachesize, DB_ENV->set_mp_mmapsize, DB_ENV->memp_fcreate, DB_MPOOLFILE->close, DB_MPOOLFILE->get, DB_MPOOLFILE->open, DB_MPOOLFILE->put, DB_MPOOLFILE->set, DB_MPOOLFILE->sync, DB_ENV->memp_register, DB_MPOOLFILE->set_clear_len, DB_MPOOLFILE->set_fileid, DB_MPOOLFILE->set_ftype, DB_MPOOLFILE->set_lsn_offset, DB_MPOOLFILE->set_pgcookie, DB_ENV->memp_stat, DB_ENV->memp_sync, and DB_ENV->memp_trickle. @ 1.1.1.5 log @Import: RPM 4.1.1 @ text @d1 2 a2 2 a3 1 d29 2 a30 2
The DB_MPOOLFILE->get method copies a pointer to the page with the page number specified by pgnoaddr, from the source file in the DB_MPOOLFILE, d52 1 a52 1 unless the DB_MPOOLFILE->set_clear_len method was called to specify other d58 1 a58 1
The DB_MPOOLFILE->get method returns a non-zero error value on failure, 0 on success, and returns DB_PAGE_NOTFOUND if the requested page does not d61 1 a61 1
The DB_MPOOLFILE->get method may fail and return a non-zero error for the following conditions: d76 4 a79 6
The DB_MPOOLFILE->get method may fail and return a non-zero error for errors specified for other Berkeley DB and C library or system functions. If a catastrophic error has occurred, the DB_MPOOLFILE->get method may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way.