+ Reply to Thread
Results 1 to 9 of 9

Thread: Upgraded to Mysql 5 and am now getting errors

  1. #1
    Senior Member cditty has disabled reputation
    Join Date
    Jan 2001
    Location
    Memphis TN
    Age
    39
    Posts
    151

    Upgraded to Mysql 5 and am now getting errors

    I just upgraded my server to mysql 5 and I am getting these errors every now and then. Any suggestions?

    Code:
    SELECT thread.threadid, thread.forumid
    FROM thread AS thread, subscribethread AS subscribethread
    LEFT JOIN deletionlog AS deletionlog ON(deletionlog.primaryid = thread.threadid AND type = 'thread')
    WHERE subscribethread.threadid = thread.threadid
    AND subscribethread.userid = 756
    AND thread.visible = 1
    AND lastpost > 1148125274
    AND deletionlog.primaryid IS NULL


  2. #2
    Customer Support Manager Steve Machol is a splendid one to behold Steve Machol is a splendid one to behold Steve Machol is a splendid one to behold Steve Machol is a splendid one to behold Steve Machol is a splendid one to behold Steve Machol is a splendid one to behold Steve Machol is a splendid one to behold Steve Machol's Avatar
    Join Date
    Jul 2000
    Posts
    143,687
    Please post the complete error message.
    Steve Machol, vBulletin Customer Support Manager

    I'm so bummed. I was logging out of SSH and accidentally typed 'exist' instead of 'exit'. The reply I got was: Permission Denied.
    What do I do now if I can't exist?


    Please do not email or PM me for vBulletin support. I will be more than glad to answer your questions on the vB Forums and in the support system.


  3. #3
    Senior Member cditty has disabled reputation
    Join Date
    Jan 2001
    Location
    Memphis TN
    Age
    39
    Posts
    151
    Database error in vBulletin 3.0.8:


    Invalid SQL:
    SELECT thread.threadid, thread.forumid
    FROM thread AS thread, subscribethread AS subscribethread
    LEFT JOIN deletionlog AS deletionlog ON(deletionlog.primaryid = thread.threadid AND type = 'thread')
    WHERE subscribethread.threadid = thread.threadid
    AND subscribethread.userid = 1221
    AND thread.visible = 1
    AND lastpost > 1148163935
    AND deletionlog.primaryid IS NULL


    mysql error: Unknown column 'thread.threadid' in 'on clause'


    mysql error number: 1054


  4. #4
    Customer Support Manager Steve Machol is a splendid one to behold Steve Machol is a splendid one to behold Steve Machol is a splendid one to behold Steve Machol is a splendid one to behold Steve Machol is a splendid one to behold Steve Machol is a splendid one to behold Steve Machol is a splendid one to behold Steve Machol's Avatar
    Join Date
    Jul 2000
    Posts
    143,687
    This means that either:

    1. Your thread table is messed up.

    2. You are using a table prefix and have not edited your config.php to use that prefix.

    3. You have installed a hack that is causing this.

    I would first check your database and see if you are using a prefix.
    Steve Machol, vBulletin Customer Support Manager

    I'm so bummed. I was logging out of SSH and accidentally typed 'exist' instead of 'exit'. The reply I got was: Permission Denied.
    What do I do now if I can't exist?


    Please do not email or PM me for vBulletin support. I will be more than glad to answer your questions on the vB Forums and in the support system.


  5. #5
    Former vBulletin Developer Scott MacVicar is on a distinguished road
    Join Date
    Dec 2000
    Location
    Reading, UK
    Posts
    13,332
    Blog Entries
    1
    Steve these are known issues with MySQL 5 that are fixed in 3.5.x.

    3.0.x does not support MySQL 5.
    Scott MacVicar

    My Blog | Twitter

  6. #6
    Senior Member cditty has disabled reputation
    Join Date
    Jan 2001
    Location
    Memphis TN
    Age
    39
    Posts
    151
    Well crap. What a time for me to let me subscription run out. Thanks Scott.


  7. #7
    Quote Originally Posted by cditty
    Database error in vBulletin 3.0.8:


    Invalid SQL:
    SELECT thread.threadid, thread.forumid
    FROM thread AS thread, subscribethread AS subscribethread
    LEFT JOIN deletionlog AS deletionlog ON(deletionlog.primaryid = thread.threadid AND type = 'thread')
    WHERE subscribethread.threadid = thread.threadid
    AND subscribethread.userid = 1221
    AND thread.visible = 1
    AND lastpost > 1148163935
    AND deletionlog.primaryid IS NULL


    mysql error: Unknown column 'thread.threadid' in 'on clause'


    mysql error number: 1054
    I had the same error after upgrading to MySQL 5.0.19-standard

    The error I was geting is:

    Database error in vBulletin 3.0.3:

    Invalid SQL:
    SELECT thread.threadid, thread.forumid
    FROM thread AS thread, subscribethread AS subscribethread
    LEFT JOIN deletionlog AS deletionlog ON(deletionlog.primaryid = thread.threadid AND type = 'thread')
    WHERE subscribethread.threadid = thread.threadid
    AND subscribethread.userid = 1083
    AND thread.visible = 1
    AND lastpost > 1147857568
    AND deletionlog.primaryid IS NULL

    mysql error: Unknown column 'thread.threadid' in 'on clause'

    mysql error number: 1054

    Date: Wednesday 17th of May 2006 08:42:08 AM
    Script: http://saudielection.com/ar/forum/usercp.php?
    Referer: http://saudielection.com/ar/forum/login.php
    Username: ………
    IP Address: ………..



    This error did not allow any one to go to there CP on the forum.

    This is how I fixed it:

    edit usercp.php

    find:

    PHP Code:
    FROM " . TABLE_PREFIX . "thread AS thread" . TABLE_PREFIX . "subscribethread AS subscribethread
    LEFT JOIN 
    " . TABLE_PREFIX . "deletionlog AS deletionlog ON(deletionlog.primaryid thread.threadid AND type 'thread')
    WHERE subscribethread.threadid thread.threadid
    AND subscribethread.userid $bbuserinfo[userid



    replace with

    PHP Code:
    FROM " . TABLE_PREFIX . "subscribethread AS subscribethread
    LEFT JOIN 
    " . TABLE_PREFIX . "thread AS thread ON(subscribethread.threadid thread.threadid)
    LEFT JOIN " . TABLE_PREFIX . "deletionlog AS deletionlog ON(deletionlog.primaryid thread.threadid AND type 'thread')
    WHERE subscribethread.userid $bbuserinfo[userid






    PS:
    I found this fix on a forum (not vbulletin) which deals with vb errors among other things.

    good luck
    Last edited by rcc; Thu 25th May '06 at 1:30pm.

  8. #8
    Senior Member Floris has disabled reputation
    Join Date
    Dec 2001
    Posts
    37,860
    Blog Entries
    13
    Hey cool, nice of you to help fix this.

    Note to people who read this though: Always make a backup of your database and files before making customizations like these; this way you can revert back to the original version and try again.

  9. #9
    Quote Originally Posted by Floris
    Hey cool, nice of you to help fix this.

    Note to people who read this though: Always make a backup of your database and files before making customizations like these; this way you can revert back to the original version and try again.
    You are absolutely right. ALLWAYS make backup of EVERYTHING before doing any changes to the code or the database.

    I have screwed up many times , but I was allways able to go back to my original settings because of backup.

    Any way I thought this might help some poor sole like me struglling to patch things up.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts