<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns:v = "urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:m =
"http://schemas.microsoft.com/office/2004/12/omml"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16608" name=GENERATOR><!--[if !mso]>
<STYLE>v\:* {
        BEHAVIOR: url(#default#VML)
}
o\:* {
        BEHAVIOR: url(#default#VML)
}
w\:* {
        BEHAVIOR: url(#default#VML)
}
.shape {
        BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]-->
<STYLE>@font-face {
        font-family: Cambria Math;
}
@font-face {
        font-family: Calibri;
}
@font-face {
        font-family: Tahoma;
}
@font-face {
        font-family: Consolas;
}
@page Section1 {size: 612.0pt 792.0pt; margin: 72.0pt 72.0pt 72.0pt 72.0pt; }
P.MsoNormal {
        FONT-SIZE: 11pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Calibri","sans-serif"
}
LI.MsoNormal {
        FONT-SIZE: 11pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Calibri","sans-serif"
}
DIV.MsoNormal {
        FONT-SIZE: 11pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Calibri","sans-serif"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
CODE {
        FONT-FAMILY: "Courier New"; mso-style-priority: 99
}
PRE {
        FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Courier New"; mso-style-priority: 99; mso-style-link: "HTML Preformatted Char"
}
SPAN.EmailStyle17 {
        COLOR: windowtext; FONT-FAMILY: "Calibri","sans-serif"; mso-style-type: personal
}
SPAN.HTMLPreformattedChar {
        FONT-FAMILY: Consolas; mso-style-priority: 99; mso-style-link: "HTML Preformatted"; mso-style-name: "HTML Preformatted Char"
}
SPAN.EmailStyle21 {
        COLOR: #1f497d; FONT-FAMILY: "Calibri","sans-serif"; mso-style-type: personal-reply
}
.MsoChpDefault {
        FONT-SIZE: 10pt; mso-style-type: export-only
}
DIV.Section1 {
        page: Section1
}
</STYLE>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=EN-GB vLink=purple link=blue>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2></FONT> </DIV><BR>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B>
mailscanner-bounces@lists.mailscanner.info
[mailto:mailscanner-bounces@lists.mailscanner.info] <B>On Behalf Of </B>Jason
Ede<BR><B>Sent:</B> Friday, February 22, 2008 10:47 AM<BR><B>To:</B>
MailScanner discussion<BR><B>Subject:</B> RE: bayes in MySQL with
replication<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">Many thanks for that... just
what I was looking for...<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">I also saw a
<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">080222 15:38:55 [ERROR] Slave:
Error 'You have an error in your SQL syntax; check the manual that corresponds
to your MySQL server version for the right syntax to use near 'ON DUPLICATE
KEY UPDATE spam_count = GREATEST(spam_count + '0', 0),<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
' at line 2' on query. Default database: 'sa_bayes'. Query: 'INSERT INTO
bayes_token<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
(id ON DUPLICATE KEY UPDATE spam_count = GREATEST(spam_count
+ '0', 0),<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
ham_count = GREATEST(ham_count + '1', 0),<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN
style="COLOR: #1f497d">
atime
= GREATEST(atime, '1203694258')Ã', Error_code: 1064<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">080222 15:38:55 [ERROR] Error
running query, slave SQL thread aborted. Fix the problem, and restart the
slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.000011'
position 5334725<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d">error. I’m guessing I can add
1064 to that list too although I can’t see what the syntax is
wrong<o:p></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"><o:p> </o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"><o:p><SPAN
class=609330617-22022008><FONT face=Arial color=#0000ff
size=2>[...]</FONT></SPAN></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"><o:p><SPAN
class=609330617-22022008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN></o:p></SPAN> </P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"><o:p><SPAN
class=609330617-22022008><FONT face=Arial color=#0000ff size=2>I have never
seen ON DUPLICATE KEY syntax like that?</FONT></SPAN></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"><o:p><SPAN
class=609330617-22022008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN></o:p></SPAN> </P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"><o:p><SPAN
class=609330617-22022008>INSERT INTO bayes_token (id,
ham_count, atime) VALUES \<BR>( GREATEST(spam_count + '0',
0),GREATEST(ham_count + '1', 0), \<BR>GREATEST(atime, '1203694258') ) \<BR>ON
DUPLICATE KEY UPDATE spam_count = GREATEST(spam_count + '0', 0),
\<BR>ham_count = GREATEST(ham_count + '1', 0),<BR>atime = GREATEST(atime,
'1203694258');</SPAN></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"><o:p><SPAN
class=609330617-22022008></SPAN></o:p></SPAN> </P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"><o:p><SPAN
class=609330617-22022008>would be how I would write
it.</SPAN></o:p></SPAN></P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"><o:p><SPAN
class=609330617-22022008></SPAN></o:p></SPAN> </P>
<P class=MsoNormal><SPAN style="COLOR: #1f497d"><o:p><SPAN
class=609330617-22022008>Rick</SPAN></o:p></SPAN></P></DIV></BLOCKQUOTE></BODY><br />--
<br />This message has been scanned for viruses and
<br />dangerous content by
<a href="http://www.mailscanner.info/"><b>MailScanner</b></a>, and is
<br />believed to be clean.
</HTML>