docs: private HostAddress searchForMasterHostAddress(Protocol protocol, List<HostAddress> loopAddress)
        throws SQLException {
      String masterHostName;
      proxy.lock.lock();
      try {
        Results results = new Results();
        protocol.executeQuery(false, results,
            "select server_id from information_schema.replica_host_status "
                + "where session_id = 'MASTER_SESSION_ID' "
                + "and last_update_timestamp > now() - INTERVAL 3 MINUTE "
                + "ORDER BY last_update_timestamp DESC LIMIT 1");
        results.commandEnd();
        ResultSet queryResult = results.getResultSet();
  
        if (!queryResult.isBeforeFirst()) {
          return null;
        } else {
          queryResult.next();
          masterHostName = queryResult.getString(1);
        }
      } finally {
        proxy.lock.unlock();
      }
  
      Matcher matcher;
      if (masterHostName != null) {
        for (HostAddress hostAddress : loopAddress) {
          matcher = auroraDnsPattern.matcher(hostAddress.host);
          if (hostAddress.host.startsWith(masterHostName) && !matcher.find()) {
            return hostAddress;
          }
        }
  
        HostAddress masterHostAddress;
        if (clusterDnsSuffix == null && protocol.getHost().contains(".")) {
          clusterDnsSuffix = protocol.getHost().substring(protocol.getHost().indexOf(".") + 1);
        } else {
          return null;
        }
  
        masterHostAddress = new HostAddress(masterHostName + "." + clusterDnsSuffix,
            protocol.getPort(), null);
        loopAddress.add(masterHostAddress);
        urlParser.setHostAddresses(loopAddress);
        return masterHostAddress;
      }
  
      return null;
    }