From 5b12c7cb4042b0e4c7c6dfcfee9fb70e3d4deb71 Mon Sep 17 00:00:00 2001 From: Rene Cannao Date: Tue, 31 Mar 2026 16:24:40 +0000 Subject: [PATCH] Document DNS cache bypass limitation for resolution_family When the DNS cache misses, the hostname is passed directly to mysql_real_connect which uses the MariaDB client library's own getaddrinfo with AF_UNSPEC. The mysql-resolution_family setting only applies to the DNS cache resolver thread, not this fallback path. Add a comment documenting this known limitation. --- lib/mysql_connection.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/mysql_connection.cpp b/lib/mysql_connection.cpp index 02d50a07dc..8a4459419e 100644 --- a/lib/mysql_connection.cpp +++ b/lib/mysql_connection.cpp @@ -959,6 +959,10 @@ char * MySQL_Connection::connect_start_DNS_lookup() { host_ip = connected_host_details.ip; } else { + // NOTE: DNS cache miss — hostname is passed directly to + // mysql_real_connect which resolves via the MariaDB client library + // using AF_UNSPEC. The mysql-resolution_family setting does NOT + // apply here; it only governs the DNS cache resolver thread. host_ip = parent->address; } return host_ip;