# mco_translog_label

This function stores a label in the log file.

### For an overview see page TL Applications

### Prototype

        MCO_RET	mco_translog_label(	mco_db_h db,
                        const char* label,
                        int * label_id )

### Arguments

db | Database connection handle
label | Text of the label with size of up to `MCO_CFG_TL_PAGE_BUFFER_SIZE` (64*1024) defined in mcocfg.h.
label_id | Pointer to the id of current label or Null (0) if the generated `label_id` is not needed.

### Description

> This function stores a label in the log file. The TL runtime generates an integer label identifier and returns its value in `label_id`. (See the description of the `mco_translog_apply()` API for how labels can be used to partially restore the database.)

### Return Codes

MCO_S_OK | The label was written successfully.
MCO_E_TL_NOT_STARTED | Transaction logging was not started.
MCO_E_TL_LOG_NOT_OPENED | The log file could not be opened.
MCO_E_TL_PIPE_LOST | All connections to a pipe were closed and its data was lost.
MCO_E_TL_PIPE_TERM | Reader returned from function `mco_translog_iterate()` before the log was finished. It terminated logging by returning a value other than `MCO_S_OK` to the callback function.
MCO_E_TL_IO_ERROR | Disk IO error.

### Files

Header file:
mcolog.h
Source file:
mcolog.c
Library:
libmcolog.a