mariadb\_rpl\_fetch(3) MariaDB Connector/C mariadb\_rpl\_fetch(3)

## [Name](#Name)

mariadb\_rpl\_fetch - fetches next event from replication stream

## [Synopsis](#Synopsis)

```
#include <mariadb_rpl.h>
MARIADB_RPL_EVENT *mariadb_rpl_fetch(MARIADB_RPL *rpl, MARIADB_RPL_EVENT *event)
    
```

## [Description](#Description)

Fetches one event from the replication stream

## [Parameter](#Parameter)

•

rpl - A replication handle which was initialized by [**mariadb\_rpl\_init(3)**](/man/enterprise-packages/mariadb-12.2/mariadb_rpl_init.3) and connected by [**mariadb\_rpl\_open(3)**](/man/enterprise-packages/mariadb-12.2/mariadb_rpl_open.3).

•

event - An event which was returned by a previous call to mariadb\_rpl\_fetch. If this value is NULL the function will allocate new memory for the event, otherwise the passed event value will be overwritten.

## [Return value](#Return_value)

An event handle or NULL if EOF packet was received.

## [Notes](#Notes)

Event memory needs to be freed by calling [**mariadb\_rpl\_free\_event(3)**](/man/enterprise-packages/mariadb-12.2/mariadb_rpl_free_event.3).

## [See also](#See_also)

•

[**mariadb\_rpl\_free\_event(3)**](/man/enterprise-packages/mariadb-12.2/mariadb_rpl_free_event.3)

## [History](#History)

mariadb\_rpl\_fetch was added in MariaDB Connector/C 3.1.0

Version 3.4

---

Document: mariadb_rpl_fetch(3) from mariadb-12.2 12.2.2-r11 (Chainguard OS)
Source: https://github.com/MariaDB/server.git
