mirror of
https://github.com/MariaDB/server.git
synced 2026-04-23 08:45:33 +02:00
The problem is that the C API function mysql_real_connect only attempts to connect to the first IP address returned for a hostname. This can be a problem if a hostname maps to multiple IP address and the server is not bound to the first one that is returned. The solution is to augment mysql_real_connect so that it attempts to connect to all IPv4 addresses that a domain name maps to. The function goes over the list of address until a successful connection is established. No test case is provided as its not possible to test this automatically with the current testing infrastructure. sql-common/client.c: The client will try to connect to each IPv4 address from the list of addresses that hostname maps to until a successful connection is established or there are no more address. |
||
|---|---|---|
| .. | ||
| client.c | ||
| Makefile.am | ||
| my_time.c | ||
| my_user.c | ||
| pack.c | ||