On Fri, May 06, 2022 at 12:31:47PM +0200, giova...@paclan.it wrote:
> On 5/6/22 11:08, Niels Kobschätzki wrote:
> > Hi,
> > 
> > I have a setup where the spamassassin-servers have actually no access to 
> > the data of the mail-servers. Now I was looking into having per user 
> > bayes-databases and saw that I can do that with a SQL-database. I have 
> > already a small galera-cluster and I wonder if spamassassin will work with 
> > it because of the limitations galera has.
> > The limitations are:
> > 
> >   * only innodb
> >   * unsupported explicit locking
> >   * a primary key on all tables is necessary
> >   * no XA transactions
> >   * no reliance on auto-increment
> > 
> > Does anyone have experience with such a setup?
> > 
> Few things to consider:
> bayes_expire has no primary key.

>From what I see, there's no reason why it shouldn't be.

CREATE TABLE bayes_expire (
  id int(11) NOT NULL default '0',
  runtime int(11) NOT NULL default '0',
  KEY bayes_expire_idx1 (id)
) ENGINE=InnoDB;

BayesStore/MySQL.pm has kind of a dumb insert which might insert things 
multiple times

  my $sql = "INSERT INTO bayes_expire (id,runtime) VALUES (?,?)";

It should just be converted to UPSERT.

Of course this won't help until 4.0.0 is released..

> bayes_vars MySQL table has the id defined as "id int(11) NOT NULL 
> AUTO_INCREMENT".

Google implies Galera supports auto_increment just fine, it just does
something funny like incrementing them in 3 multiples or something.

Reply via email to