mariadb_rpl_get_optionsv(3)

πŸ“¦
version 13.0.2 Β· 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

mariadb_rpl_get_optionsv πŸ’–

okay bestie, so this one lives in the MariaDB Connector/C family (that's the manual name, in case you were wondering which crew we're running with) and it's literally the getter of the replication option world. Name on the birth certificate: mariadb_rpl_get_optionsv β€” get replication option value. read it back. say it with your chest. πŸŽ€


✨ SYNOPSIS ✨

#include <mariadb_rpl.h>

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

look at those ... at the end β€” she's variadic, she's mysterious, she takes one or more values and she is not sorry about it. πŸ’…


🌸 PARAMETER 🌸

  • rpl β€” a replication handle, and listen, it has to be one that was already allocated by mariadb_rpl_init. don't be out here passing random garbage, bestie, that's not the vibe. πŸ™ˆ
  • option β€” the option you wanna get, followed by one or more values. yes, one or more, she's flexible like that. ✨

πŸ¦‹ the option menu (pick your fighter)

  • MARIADB_RPL_FILENAME β€” type: char **, size_t *. it hands you the name of the binlog file and the length of that name. two for one, we love an overachiever. πŸ’–
  • MARIADB_RPL_START β€” type: unsigned long *. this is the start position. where we're starting. the starting point. iconic. ⭐
  • MARIADB_RPL_SERVER_ID β€” type: uint32_t *. the server id, no cap. πŸ‘‘
  • MARIADB_RPL_FLAGS β€” type: uint32_t *. flags. flags flags flags. 🌈
  • MARIADB_RPL_SEMI_SYNC β€” type: uint32_t *. semi sync replication: 1 = ON, 0 = OFF. and ngl, this one is a newer addition β€” it was added in version 3.3.6. so if you're on something ancient, she's not there yet, don't come for her. πŸ’€

🫢 RETURN VALUE 🫢

returns zero on success, non zero on error. that's it, that's the whole personality. zero = slay, non-zero = something went sideways, go check yourself. 😭

lowkey important: zero is the good one here. don't get it twisted.

πŸ’œ SEE ALSO πŸ’œ


πŸ“œ HISTORY πŸ“œ

mariadb_rpl_get_optionsv was added in MariaDB Connector/C 3.1.0. so she's been around, she's established, she's got main character energy from day one. πŸ’…


and that's the whole page, bestie!! this was pulled from the MariaDB Connector/C manual, Version 3.4 era, and the title line up top is literally mariadb_rpl_get_optionsv(3) if you ever need to cite her. mwah, go get those options. πŸ“βœ¨πŸŽ€

πŸ“¦ where this page comes from