ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

[URGENT] MySQL crashes when new record inserted in 'exp_category_posts'

November 04, 2011 1:41am

Subscribe [3]
  • #1 / Nov 04, 2011 1:41am

    This is strange but MySQL crashes with a new record insterted in exp_category_posts. If I delete the record, it works fine. There are only 512 records in the table. I can’t repair the table as it says ‘Repair is not for the table database engine type’

    Please help me on this as this is happening in the production. I took a copy and the same happens in local also, so its not a hosting issue.

    Srikanth

  • #2 / Nov 04, 2011 5:00am

    John Henry Donovan

    12339 posts

    Hi Srikanth,

    What version and build of EE are you using?
    Are you using any addons?
    What type of hosting environment are you using?

    Can you post the exact error you are receiving please?

  • #3 / Nov 04, 2011 5:47am

    Thanks John but I figured out the problem. This is a MySQL bug when DISTINCT used combinely with COUNT. http://www.chriscalender.com/?p=315. I’m using Category Item Count Plugin (bbr_cat_itemcount) where they have used these kinds of queries.

    SELECT COUNT(DISTINCT ecp.entry_id) AS total_count FROM exp_category_posts AS ecp WHERE ecp.cat_id = 238

    I optimized these queries to make it work.

    Srikanth

  • #4 / Nov 04, 2011 10:22am

    Sue Crocker

    26054 posts

    Glad you were able to figure out what the problem was. Don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases