bayes in MySQL with replication

Rick Cooper rcooper at dwford.com
Sat Feb 23 16:39:33 GMT 2008


 

 > -----Original Message-----
 > From: mailscanner-bounces at lists.mailscanner.info 
 > [mailto:mailscanner-bounces at lists.mailscanner.info] On 
 > Behalf Of Jason Ede
 > Sent: Saturday, February 23, 2008 5:22 AM
 > To: MailScanner discussion
 > Subject: RE: bayes in MySQL with replication
 > 
 > It's the standard bayes MySQL module. I've looked at both 
 > ends and I can't see where that code is generated.
 > 
 > Jason
 > 
[...]

I just looked through that code my self and I only find two instances of ON
DUPLICATE...

my $sql = "INSERT INTO bayes_token
               (id, token, spam_count, ham_count, atime)
               VALUES (?,?,?,?,?)
               ON DUPLICATE KEY UPDATE spam_count = GREATEST(spam_count + ?,
0),
                                       ham_count = GREATEST(ham_count + ?,
0),
                                       atime = GREATEST(atime, ?)";

Both have the correct syntax. That is really odd. It explains why every
install doesn't puke when it hits that code, because SA isn't generating
that code at all. And the way the syntax is corrupted doesn't look random at
all. Makes you wonder where that is coming from, skipping syntax errors
would certainly keep the slave up, but that update clearly failed and I
wouldn't want to see that continue if I were you as your bayes database
would obviously be inaccurate.

Rick


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the MailScanner mailing list