No announcement yet.

SQL Database problem table crashed

  • Filter
  • Time
  • Show
Clear All
new posts

  • SQL Database problem table crashed

    Well i looked all over google and this forum to look up for the answers but it did not quite helped me yet.

    I got this problem when i enter members/posts/subforums ect.

    Database error in vBulletin 3.6.8:
    Invalid SQL:
       IF(votenum >= 1, votenum, 0) AS votenum,
       IF(votenum >= 1 AND votenum > 0, votetotal / votenum, 0) AS voteavg,
       post.pagetext AS preview,
       thread.threadid, thread.title AS threadtitle, thread.forumid, pollid, open, replycount, postusername, postuserid, thread.iconid AS threadiconid,
       thread.lastpost, thread.lastposter, thread.lastpostid, thread.dateline, IF(views<=replycount, replycount+1, views) AS views, notes, thread.visible, sticky, votetotal, thread.attach,
       hiddencount, deletedcount
       , NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed
       , deletionlog.userid AS del_userid, deletionlog.username AS del_username, deletionlog.reason AS del_reason
       , threadredirect.expires
       , post.pagetext AS previewbbcode
      FROM thread AS thread
       LEFT JOIN deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND deletionlog.type = 'thread')
        LEFT JOIN subscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = 1 AND canview = 1)
       LEFT JOIN post AS post ON(post.postid = thread.firstpostid)
       LEFT JOIN threadredirect AS threadredirect ON( = 10 AND thread.threadid = threadredirect.threadid)
      WHERE thread.threadid IN (0,14,6,12,11,10,9,8,7,5,3,1,2) 
      ORDER BY sticky DESC, lastpost DESC;
    MySQL Error  : Table './np605_forum/post' is marked as crashed and should be repaired
    Error Number : 145
    Date         : Friday, December 28th 2007 @ 03:25:47 PM
    Oke then i will acces my admincp and run the repair script and done this also:
    So i selected the post script and yes it could not be repaired, even after 10 times the try.

    Then i used my phpmyadmin to repair the problem using the sql command:
    REPAIR TABLE post, cause posts is 0Kb that is strange indeed, but mysql did not returnd anything strange.
    I was looking and it was in use, but the forum is closed. So what could be my next step in order to fix the tables.

  • #2
    You can try uploading tools.php and repair it from that point and do leave your forums close until you have resolved this issue.


    • #3
      i did that as well, now but that did not helped as well. still 0kb and crashed.
      Someone any other thoughts?

      i also tried: mysqlcheck -yourmysqlusername -pyourmysqlpassword databasename - as well along with my own username, password ect. in phpmyadmin as well as the admincp of vbulletin but i got a wrong sql syntax
      Last edited by HS2005; Sat 12 Jan '08, 4:24am.


      • #4
        like he said repair and optimize your database..
        security community


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