Private messaging errors with mySQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Greg
    Member
    • May 2000
    • 91

    Private messaging errors with mySQL

    I get about 5 of these a day:




    Database error in vBulletin 2.2.7:

    Invalid SQL:
    SELECT DISTINCT privatemessage.*, user.username AS tousername, user.emailonpm, user.invisible,
    user.lastactivity, icon.iconpath, session.userid AS sessionuserid
    FROM privatemessage
    LEFT JOIN user ON (user.userid = privatemessage.touserid)
    LEFT JOIN icon ON (icon.iconid = privatemessage.iconid)
    LEFT JOIN session ON (session.userid = user.userid
    AND session.userid <> 0 AND user.invisible = 0 AND session.lastactivity>0)
    WHERE fromuserid=562
    AND folderid <> -1
    AND receipt > 0

    ORDER BY dateline DESC
    mysql error: Lost connection to MySQL server during query

    mysql error number: 2013

    Date: Sunday 22nd of September 2002 10:34:59 PM
    Script: http://forums.teencentre.net/private2.php?s=&daysprune=
    Referer: http://forums.teencentre.net/private.php?s=&folderid=0

    where it says "WHERE fromuserid=562" can be any other user. help! the guy who does my hosting can find nothing wrong.
  • Steve Machol
    Former Customer Support Manager
    • Jul 2000
    • 154488

    #2
    See this post for all the possible causes of a lost connection error:

    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.


    Comment

    • fastforward
      Senior Member
      • Nov 2000
      • 1013

      #3
      Re: Private messaging errors with mySQL

      Originally posted by Greg
      I get about 5 of these a day:




      Database error in vBulletin 2.2.7:

      Invalid SQL:
      SELECT DISTINCT privatemessage.*, user.username AS tousername, user.emailonpm, user.invisible,
      user.lastactivity, icon.iconpath, session.userid AS sessionuserid
      FROM privatemessage
      LEFT JOIN user ON (user.userid = privatemessage.touserid)
      LEFT JOIN icon ON (icon.iconid = privatemessage.iconid)
      LEFT JOIN session ON (session.userid = user.userid
      AND session.userid <> 0 AND user.invisible = 0 AND session.lastactivity>0)
      WHERE fromuserid=562
      AND folderid <> -1
      AND receipt > 0

      ORDER BY dateline DESC
      mysql error: Lost connection to MySQL server during query

      mysql error number: 2013

      Date: Sunday 22nd of September 2002 10:34:59 PM
      Script: http://forums.teencentre.net/private2.php?s=&daysprune=
      Referer: http://forums.teencentre.net/private.php?s=&folderid=0

      where it says "WHERE fromuserid=562" can be any other user. help! the guy who does my hosting can find nothing wrong.
      Are you using MySQL 4.0?

      I had this problem with the early MySQL 4 alphas and betas. I believe the problem was caused by the globbed column select in combination with the number of joins. I fixed it by changing the queries to explicitly select all columns by name. The problem doesn't exist in the latest CVS version by the way.

      If you're not on MySQL 4.0, then disregard the above
      Last edited by fastforward; Mon 23 Sep '02, 3:38pm.
      http://britishexpats.com/ - British expatriate community

      Comment

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