Re: SA 4.0.1 Bayes in SQL: MYSQL_OPT_RECONNECT is deprecated
Bill Cole <[email protected]>
| Newsgroups | gmane.mail.spam.spamassassin.general |
|---|---|
| Message-ID | <[email protected]> |
On 2025-01-10 at 08:49:04 UTC-0500 (Fri, 10 Jan 2025 14:49:04 +0100) John Wilcock <[email protected]> is rumored to have said: > Hi all, > > I'm using Spamassassin 4.0.1 on Gentoo and I've recently switched to > using MySQL (actually Mariadb 10.6) for Bayes storage. > > I'm seeing "WARNING: MYSQL_OPT_RECONNECT is deprecated and will be > removed in a future version" warnings. > > $ spamassassin --lint --debug=bayes > Jan 10 14:45:02.843 [15474] dbg: bayes: stopwords for languages > enabled: en > Jan 10 14:45:02.858 [15474] dbg: bayes: learner_new > self=Mail::SpamAssassin::Plugin::Bayes=HASH(0x561f44647378), > bayes_store_module=Mail::SpamAssassin::BayesStore::MySQL > Jan 10 14:45:02.870 [15474] dbg: bayes: using username: vmail > Jan 10 14:45:02.870 [15474] dbg: bayes: learner_new: got > store=Mail::SpamAssassin::BayesStore::MySQL=HASH(0x561f44c6fa38) > WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a > future version. > Jan 10 14:45:02.884 [15474] dbg: bayes: database connection > established > Jan 10 14:45:02.884 [15474] dbg: bayes: found bayes db version 3 > > I see no sign of a reconnect option being used in BayesStore/MySQL.pm > > I know it's only a warning; everything appears to work anyway. > > Any ideas? This can only be fixed in the DBD module. The problem is specifically documented at https://github.com/perl5-dbi/DBD-mysql/issues/354 which indicates that the issue was fixed in DBD-mysql v5.001 over a year ago. There are also encoding and other fixes in recent versions, so it is a good idea to update that module. -- Bill Cole [email protected] or [email protected] (AKA @[email protected] and many *@billmail.scconsult.com addresses) Not Currently Available For Hire