From: Eric Bollengier Date: Thu, 24 Aug 2023 08:03:32 +0000 (+0200) Subject: Fix mysql warning about OPT_RECONNECT that is deprecated in 8.0.34 X-Git-Tag: Beta-15.0.0~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0428b1ee0371b31d4fac2dc6c375f63b787d4028;p=thirdparty%2Fbacula.git Fix mysql warning about OPT_RECONNECT that is deprecated in 8.0.34 --- diff --git a/bacula/src/cats/mysql.c b/bacula/src/cats/mysql.c index eccc13bbc..5c08ff207 100644 --- a/bacula/src/cats/mysql.c +++ b/bacula/src/cats/mysql.c @@ -276,13 +276,14 @@ bool BDB_MYSQL::bdb_open_database(JCR *jcr) bmicrosleep(5,0); } -#if MYSQL_VERSION_ID <= 50117 +#if MYSQL_VERSION_ID < 80034 // Deprecated in 8.0.34 +# if MYSQL_VERSION_ID <= 50117 mysql_options(&mdb->m_instance, MYSQL_OPT_RECONNECT, (char*)&reconnect); /* so connection does not timeout */ -#else +# else mysql_options(&mdb->m_instance, MYSQL_OPT_RECONNECT, &reconnect); /* so connection does not timeout */ -#endif - +# endif Dmsg0(50, "mysql_real_connect done\n"); +#endif Dmsg3(50, "db_user=%s db_name=%s db_password=%s\n", mdb->m_db_user, mdb->m_db_name, (mdb->m_db_password == NULL) ? "(NULL)" : mdb->m_db_password);