[pLog-svn] addcomment sql error

Oscar Renalias oscar at renalias.net
Sun Jul 16 21:04:41 GMT 2006


I need to look into this, it could be a bug in the code that handles
the updates of articles. Basically, article counters are updated every
time a comment is received and in order to update the links "combo"
table that links articles and categories, we first delete all pairs
and then recreate them all again. It could be that data is not being
deleted correctly and when inserting the new pairs again, it obviously
fails...


On 7/16/06, Jon Daley <plogworld at jon.limedaley.com> wrote:
>         I should have said: the 266 and 9 are valid article and
> category ids, and that particular article has gotten a lot of spam
> recently (bayesian filter, yay), so it is likely that it was a spammer who
> tried to make that comment, and maybe made multiple comments close
> together chronologically, though I am not sure what the article_category
> field would be updated when a comment is made.
>
>
> On Sat, 15 Jul 2006, Jon Daley wrote:
>
> > Anyone figure this out quicker than I can get to it?
> >
> > /home/jondaley/www/plog/class/logger/logger/logger.class.php(157):
> > patternlayout.format
> > /home/jondaley/www/plog/class/logger/logger/logger.class.php(137): logger.log
> > /home/jondaley/www/plog/class/dao/model.class.php(149): logger.error
> > /home/jondaley/www/plog/class/dao/articles.class.php(665): articles.execute
> > /home/jondaley/www/plog/class/dao/articles.class.php(725):
> > articles.addpostcategorieslink
> > /home/jondaley/www/plog/class/dao/articles.class.php(959):
> > articles.updatepostcategorieslink
> > /home/jondaley/www/plog/class/dao/commentscommon.class.php(84):
> > articles.updatearticle
> > /home/jondaley/www/plog/class/security/bayesianfilter.class.php(123):
> > articlecomments.addcomment
> > /home/jondaley/www/plog/class/security/pipeline.class.php(171):
> > bayesianfilter.filter
> > /home/jondaley/www/plog/class/action/blogaction.class.php(79):
> > pipeline.process
> > /home/jondaley/www/plog/class/action/addcommentaction.class.php(44):
> > addcommentaction.blogaction
> > /home/jondaley/www/plog/class/controller/controller.class.php(304):
> > addcommentaction.addcommentacti
> > on
> > /home/jondaley/www/plog/index.php(50): blogcontroller.process
> >
> > 09-07-2006 08:51:51 ERROR - The following query =
> > INSERT INTO plog_article_categories_link (article_id,category_id) VALUES
> > (266,9);generated the foll
> > owing error message =
> > Duplicate entry '266-9' for key 1
> > ~
> > ~
> > ~
> >
> >
> > --
> > Jon Daley
> > http://jon.limedaley.com/
> >
> > The problem with the gene pool is that there is no lifeguard.
> > _______________________________________________
> > pLog-svn mailing list
> > pLog-svn at devel.lifetype.net
> > http://devel.lifetype.net/mailman/listinfo/plog-svn
> >
>
> --
> Jon Daley
> http://jon.limedaley.com/
>
> German is a great language, because no matter what word you say,
> it always sounds like millions of people are going to die.
> -- Vagel Keller
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>


More information about the pLog-svn mailing list