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

Check result of COM_REGISTER_SLAVE and set error message

if it fails.
This commit is contained in:
Georg Richter
2023-02-22 15:08:24 +01:00
parent 49ecb8bd2c
commit acb73df26c

View File

@@ -783,8 +783,11 @@ int STDCALL mariadb_rpl_open(MARIADB_RPL *rpl)
int4store(p, 0);
p+= 4;
if (ma_simple_command(rpl->mysql, COM_REGISTER_SLAVE, (const char *)buffer, p - buffer, 1, 0))
if (ma_simple_command(rpl->mysql, COM_REGISTER_SLAVE, (const char *)buffer, p - buffer, 0, 0))
{
rpl_set_error(rpl, mysql_errno(rpl->mysql), 0, NULL, 0);
return 1;
}
}
if (rpl->mysql)