No announcement yet.

Threadviews and attachmentviews MySQL errors

  • Filter
  • Time
  • Show
Clear All
new posts

  • Threadviews and attachmentviews MySQL errors

    This evening one of my sites running vb 3.0.7 crashed due to free disk space exhaustion. It appears that in the process of running out of disk space, the attachmentview and threadviews tables got trashed.

    When the cron jobs for attachmentviews and threadviews runs, I get an email saying that:

    Database error in vBulletin 3.0.7:

    Invalid SQL: SELECT attachmentid, COUNT(*) AS views FROM attachmentviews GROUP BY attachmentid
    mysql error: Can't find file: 'attachmentviews.MYD' (errno: 2)

    mysql error number: 1017

    Sure enough, the attchmentviews.MYD file doesn't exist anymore. When I log into MySQL with phpmyadmin, these two tables show "in use".

    I don't think this is a VB issue as much as a MySQL problem, but how can I get these two tables recreated and active again?

    Any help is greatly appreciated.

    Date: Tuesday 07th of June 2005 11:10:35 PM

  • #2
    First, if you haven't done so yet, you need to upgrade to vB 3.0.7.

    To fix these immediate errors, run these queries to recreate these tables (assuming you have no table prefix):

    DROP TABLE IF EXISTS attachmentviews;
    CREATE TABLE attachmentviews (
    attachmentid INT UNSIGNED NOT NULL DEFAULT '0',
    KEY postid (attachmentid)

    DROP TABLE IF EXISTS threadviews;
    CREATE TABLE threadviews (
    KEY threadid (threadid)
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography

    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    • #3
      Thanks Steve.

      I am running 3.0.7, so we should be ok there.

      Running those queries from the command line got the tables restored. Everything looks ok there. For some reason, those queries wouldn't run from myphpadmin, so I need to investigate that further, but I don't see any other problems with my vb setup.

      Thanks again!


      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.