Skrevet av Emne: SpamAssassin: Issuing rollback() due to DESTROY without explicit disconnect()  (Lest 9166 ganger)

Utlogget Floyd-ATC

  • Livstidsdiktator
  • Administrator
  • Guru
  • *****
  • Innlegg: 542
  • Karma: +12/-0
    • MSN Messenger - floyd@atc.no
    • Vis profil
    • floyd.atc.no
    • E-post
SpamAssassin logs the following message in /var/log/messages

Kode: [Velg]
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::mysql::db handle bayes:localhost at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/Plugin/Bayes.pm line 1516
This is because SpamAssassin for some reason explicitly sets AutoCommit to 0 and doesn't properly disconnect() its database handle before it goes out of scope. This problem was first reported in 2010(!) and instead of resulting in a patch, the discussion degenerated into bashing the Perl language.

Note that if you are using MyISAM tables in MySQL, rollbacks are not actually possible. If, however, you are using a table format which supports transaction (such as "innodb"), then this bug is effectively preventing your Bayes database from learning.

The quick fix is to enable AutoCommit, hopefully the SpamAssassin team will come up with a more proper fix before the sun collapses.

Edit the file "/usr/share/perl5/vendor_perl/Mail/SpamAssassin/BayesStore/MySQL.pm"
Change
Kode: [Velg]
'AutoCommit' => 0to
Kode: [Velg]
'AutoCommit' => 1
Save the file and restart the spamassassin service.



-Floyd.

--
Det finnes 10 typer mennesker;
de som forstår binærtall, de som ikke gjør det, og de som forstår Grey code.