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.07.59; author rse; state Exp; branches; next 1.1.1.5; 1.1.1.5 date 2003.01.18.14.04.56; author rse; state Exp; branches; next ; desc @@ 1.2 log @remove the ancient RPM 4.2.1 source tree copy @ text @ Berkeley DB: log_put

log_put

APIRef

#include <db.h>

int log_put(DB_ENV *env, DB_LSN *lsn, const DBT *data, u_int32_t flags);

Description

The log_put function appends records to the log. The DB_LSN of the put record is returned in the lsn argument. The flags argument may be set to one of the following values:

DB_CHECKPOINT
The log should write a checkpoint record, recording any information necessary to make the log structures recoverable after a crash.

DB_CURLSN
The DB_LSN of the next record to be put is returned in the lsn argument.

DB_FLUSH
The log is forced to disk after this record is written, guaranteeing that all records with DB_LSN values less than or equal to the one being put are on disk before this function returns (this function is most often used for a transaction commit; see txn_commit for more information).

The caller is responsible for providing any necessary structure to data. (For example, in a write-ahead logging protocol, the application must understand what part of data is an operation code, what part is redo information, and what part is undo information. In addition, most transaction managers will store in data the DB_LSN of the previous log record for the same transaction, to support chaining back through the transaction's log records during undo.)

The log_put function returns a non-zero error value on failure and 0 on success.

Errors

The log_flush function may fail and return a non-zero error for the following conditions:

EINVAL
An invalid flag value or parameter was specified.

The record to be logged is larger than the maximum log record.

The log_put 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 log_put function may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way.

See Also

DB_ENV->set_lg_bsize, DB_ENV->set_lg_dir, DB_ENV->set_lg_max, DB_ENV->set_lg_regionmax, log_archive, log_compare, log_file, log_flush, log_get, log_put, log_register, log_stat, and log_unregister.

APIRef

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 Berkeley DB: DB_ENV->log_put d14 1 a14 1

DB_ENV->log_put

d25 1 a25 1 DB_ENV->log_put(DB_ENV *env, d29 1 a29 1

The DB_ENV->log_put function appends records to the log. The DB_LSN of d39 3 a41 2 one being "put" are on disk before DB_ENV->log_put returns. d50 2 a51 1

The DB_ENV->log_put function returns a non-zero error value on failure and 0 on success. d53 1 a53 1

The DB_ENV->log_flush function may fail and return a non-zero error for the following conditions: d58 2 a59 2

The DB_ENV->log_put 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_ENV->log_put function may fail and return d67 1 a67 1 DB_ENV->log_archive, d69 6 a74 8 DB_ENV->log_cursor, DB_ENV->log_file, DB_ENV->log_flush, DB_ENV->log_put, DB_ENV->log_register, DB_ENV->log_stat, DB_ENV->log_unregister, DB_LOGC->close d76 1 a76 1 DB_LOGC->get. @ 1.1.1.3 log @Import: RPM 4.0.5 @ text @d1 2 a2 2 a3 1 d29 1 a29 1

The DB_ENV->log_put method appends records to the log. The DB_LSN of d33 4 d38 1 a38 1 that all records with DB_LSN values less than or equal to the d46 1 a46 1 DB_LSN of the previous log record for the same transaction, to d49 1 a49 1

The DB_ENV->log_put method returns a non-zero error value on failure and 0 on success. d51 1 a51 1

The DB_ENV->log_flush method may fail and return a non-zero error for the following conditions: d56 4 a59 6

The DB_ENV->log_put 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_ENV->log_put method may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way.

Class

DB_ENV, DB_LOGC, DB_LSN d61 16 a76 1 Logging Subsystem and Related Methods @ 1.1.1.4 log @Import: RPM 4.1 @ text @d1 2 a2 2 d4 1 d30 1 a30 1

The DB_ENV->log_put function appends records to the log. The DB_LSN of a33 4

DB_CHECKPOINT
The log should write a checkpoint record, recording any information necessary to make the log structures recoverable after a crash.

DB_CURLSN
The DB_LSN of the next record to be put is returned in the lsn argument. d35 1 a35 1 that all records with DB_LSN values less than or equal to the d43 1 a43 1 DB_LSN of the previous log record for the same transaction, to d46 1 a46 1

The DB_ENV->log_put function returns a non-zero error value on failure and 0 on success. d48 1 a48 1

The DB_ENV->log_flush function may fail and return a non-zero error for the following conditions: d53 6 a58 4

The DB_ENV->log_put 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_ENV->log_put function may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way. d60 1 a60 16 DB_ENV->set_lg_bsize, DB_ENV->set_lg_dir, DB_ENV->set_lg_max, DB_ENV->set_lg_regionmax, DB_ENV->log_archive, log_compare, DB_ENV->log_cursor, DB_ENV->log_file, DB_ENV->log_flush, DB_ENV->log_put, DB_ENV->log_register, DB_ENV->log_stat, DB_ENV->log_unregister, DB_LOGC->close and DB_LOGC->get. @ 1.1.1.5 log @Import: RPM 4.1.1 @ text @d1 2 a2 2 a3 1 d29 1 a29 1

The DB_ENV->log_put method appends records to the log. The DB_LSN of d33 4 d38 1 a38 1 that all records with DB_LSN values less than or equal to the d46 1 a46 1 DB_LSN of the previous log record for the same transaction, to d49 1 a49 1

The DB_ENV->log_put method returns a non-zero error value on failure and 0 on success. d51 1 a51 1

The DB_ENV->log_flush method may fail and return a non-zero error for the following conditions: d56 4 a59 6

The DB_ENV->log_put 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_ENV->log_put method may fail and return DB_RUNRECOVERY, in which case all subsequent Berkeley DB calls will fail in the same way.

Class

DB_ENV, DB_LOGC, DB_LSN d61 16 a76 1 Logging Subsystem and Related Methods @