> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/connectors/mariadb-connector-c/mariadb-binlogreplication-api-reference/replication-api-function-reference/mariadb_rpl_extract_rows.md).

# mariadb\_rpl\_extract\_rows()

Extracts row data from a replication event and returns a linked list of individual row change records for further processing.

### Syntax

```sql
#include <mariadb_rpl.h>

MARIADB_RPL_ROW *mariadb_rpl_extract_rows(
    MARIADB_RPL *rpl,
    MARIADB_RPL_EVENT *tm_event,
    MARIADB_RPL_EVENT *row_event);
```

### Parameters

| Parameter   | Description                                                                                                                                                                                               |
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `rpl`       | A replication handle previously allocated by [`mariadb_rpl_init()`](/docs/connectors/mariadb-connector-c/mariadb-binlogreplication-api-reference/replication-api-function-reference/mariadb_rpl_init.md). |
| `tm_event`  | The last `TABLE_MAP_EVENT`, which defines the table structure and column metadata.                                                                                                                        |
| `row_event` | The row event (`WRITE_ROWS_EVENT`, `UPDATE_ROWS_EVENT`, or `DELETE_ROWS_EVENT`) containing the raw row data to decode.                                                                                    |

### Return Value

Returns a pointer to a linked list of `MARIADB_RPL_ROW` structures on success, or `NULL` on failure. Each node in the list represents one row in the event.

### History

Added in MariaDB Connector/C 3.3.5.

### See also

* [`mariadb_rpl_fetch()`](/docs/connectors/mariadb-connector-c/mariadb-binlogreplication-api-reference/replication-api-function-reference/mariadb_rpl_fetch.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/connectors/mariadb-connector-c/mariadb-binlogreplication-api-reference/replication-api-function-reference/mariadb_rpl_extract_rows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
