1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

CONC-592: Register replica with host and port

Added new option MARIADB_OPT_RPL_REGISTER_REPLICA which expects
two parameters, host and port. When this option was set, rpl_open
will send a COM_REGISTER_SLAVE command with server_id, host and
port to the connected server. This information can be retrieved
by "SHOW SLAVE STATUS" command.

Example:

rc= mysql_optionsv(mysql, MARIADB_OPT_RPL_REGISTER_REPLICA,
                   "myhost", 123);
This commit is contained in:
Georg Richter
2022-05-23 14:05:06 +02:00
parent 5e94e7c27f
commit fcce4a8c76
5 changed files with 152 additions and 4 deletions

View File

@@ -248,7 +248,8 @@ extern const char *SQLSTATE_UNKNOWN;
MARIADB_OPT_PROXY_HEADER,
MARIADB_OPT_IO_WAIT,
MARIADB_OPT_SKIP_READ_RESPONSE,
MARIADB_OPT_RESTRICTED_AUTH
MARIADB_OPT_RESTRICTED_AUTH,
MARIADB_OPT_RPL_REGISTER_REPLICA
};
enum mariadb_value {