You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by John Wilcock <jo...@wilcock.fr> on 2025/01/10 13:49:04 UTC
SA 4.0.1 Bayes in SQL: MYSQL_OPT_RECONNECT is deprecated
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?
--
John
Re: SA 4.0.1 Bayes in SQL: MYSQL_OPT_RECONNECT is deprecated
Posted by John Wilcock <jo...@wilcock.fr>.
Le 10/01/2025 à 15:35, Bill Cole a écrit :
> On 2025-01-10 at 08:49:04 UTC-0500 (Fri, 10 Jan 2025 14:49:04 +0100)
> John Wilcock <jo...@wilcock.fr>
> 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.
>>
>> 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.
>
Thanks - upgrading DBD-mysql has fixed the issue.
--
John
Re: SA 4.0.1 Bayes in SQL: MYSQL_OPT_RECONNECT is deprecated
Posted by Bill Cole <sa...@billmail.scconsult.com>.
On 2025-01-10 at 08:49:04 UTC-0500 (Fri, 10 Jan 2025 14:49:04 +0100)
John Wilcock <jo...@wilcock.fr>
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
bill@scconsult.com or billcole@apache.org
(AKA @grumpybozo@toad.social and many *@billmail.scconsult.com
addresses)
Not Currently Available For Hire