freebsd-ports/net/libnss-mysql/files/patch-src_mysql.c
Dima Panov 1709b49e19 net/libnss-mysql: unbreak build with mysql80/maria105+ (+)
Transfer maintainership vd => fluffy

PR:		269130
Approved by:	vd
2023-02-01 15:08:25 +03:00

22 lines
823 B
C

--- src/mysql.c.orig 2005-09-04 03:34:02 UTC
+++ src/mysql.c
@@ -196,6 +196,7 @@ _nss_mysql_connect_sql (MYSQL_RES **mresult)
int retval;
sql_server_t *server = &conf.sql.server;
unsigned int port;
+ my_bool reconnect = 1;
DENTER
@@ -238,8 +239,9 @@ _nss_mysql_connect_sql (MYSQL_RES **mresult)
DSRETURN (NSS_UNAVAIL)
}
ci.valid = ntrue;
- ci.link.reconnect = 0; /* Safety: We can't let MySQL assume socket is
- still valid; see _nss_mysql_validate_socket */
+ /* Safety: We can't let MySQL assume socket is still valid;
+ see _nss_mysql_validate_socket */
+ mysql_options(&ci.link, MYSQL_OPT_RECONNECT, &reconnect);
DSRETURN (NSS_SUCCESS)
}
_nss_mysql_log (LOG_ALERT, "Connection to server '%s' failed: %s",