> 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_get_optionsv.md).

# mariadb\_rpl\_get\_optionsv()

Retrieves the current value of a replication handle option previously set with [`mariadb_rpl_optionsv()`](/docs/connectors/mariadb-connector-c/mariadb-binlogreplication-api-reference/replication-api-function-reference/mariadb_rpl_optionsv.md).

### Syntax

```sql
#include <mariadb_rpl.h>

int mariadb_rpl_get_optionsv(MARIADB_RPL *rpl,
                               enum mariadb_rpl_option option,
                               ...);
```

### 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). |
| `option`  | The option to be set, followed by one or more values.                                                                                                                                                     |
| `...`     | A pointer to a variable of the appropriate type to receive the option value.                                                                                                                              |

### Options

| Option                  | Output type           | Description                                                                             |
| ----------------------- | --------------------- | --------------------------------------------------------------------------------------- |
| `MARIADB_RPL_FILENAME`  | `char **`, `size_t *` | Pointer to the binary log filename and its length.                                      |
| `MARIADB_RPL_START`     | `unsigned long *`     | Start position in the binary log.                                                       |
| `MARIADB_RPL_SERVER_ID` | `uint32_t *`          | Configured server ID.                                                                   |
| `MARIADB_RPL_FLAGS`     | `uint32_t *`          | Current flags bitmask.                                                                  |
| `MARIADB_RPL_SEMI_SYNC` | `uint32_t *`          | Semi-sync replication state: `1` = enabled, `0` = disabled. Added in Connector/C 3.3.6. |

### Return Value

Returns zero on success, non-zero if the option is not recognized.

### History

Added in [MariaDB Connector/C 3.1.0](/docs/release-notes/connectors/c/3.1/3.1.0.md).

### See also

* [`mariadb_rpl_optionsv()`](/docs/connectors/mariadb-connector-c/mariadb-binlogreplication-api-reference/replication-api-function-reference/mariadb_rpl_optionsv.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_get_optionsv.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.
