Announcement

Collapse
No announcement yet.

Invalid SQL: DELETE FROM session WHERE sessionhash=''

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Invalid SQL: DELETE FROM session WHERE sessionhash=''

    My Web Host just migrated our servers to a new data center. It seems like everything in vbulletin works fine, except I keep getting an email containing this:
    Code:
    Database error in vBulletin 2.2.9:
    
    Invalid SQL: DELETE FROM session WHERE sessionhash=''
    mysql error: 
    
    mysql error number:
    Code:
    Database error in vBulletin 2.2.9:
    
    Invalid SQL: DELETE FROM session WHERE sessionhash=''
    mysql error: 
    
    mysql error number: 
    
    Date: Sunday 03rd of August 2003 01:39:05 PM
    Script: [url="http://www.codenewbie.com/forum/"][color=#800080]http://www.codenewbie.com/forum/[/color][/url]
    Referer:
    it's only queries related to the session table.

    Please help me here, .. I need to get to the bottom of this. My community is only 700+, but that is enough to flood an administrator's mailbox throughout the day.

    Thanks
    Last edited by sde; Sun 3 Aug '03, 10:55am.

  • #2
    Check the database with phpMyAdmin and make sure there is a session table.
    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


    • #3
      Originally posted by Steve Machol
      Check the database with phpMyAdmin and make sure there is a session table.
      the session table is definately there.

      would it hurt to empty it? i didn't think so, but i didn't want to mess anything up.

      Comment


      • #4
        That's good. Unfortunately for some reason it refuses to empy, hence the error message you are getting. You can try this query:

        DELETE FROM session;

        If that doesn't work, run this one:

        DROP TABLE session;
        CREATE TABLE session (
        sessionhash char(32) NOT NULL,
        userid int(10) unsigned DEFAULT '0' NOT NULL,
        host char(50) NOT NULL,
        useragent char(50) NOT NULL,
        lastactivity int(10) unsigned DEFAULT '0' NOT NULL,
        location CHAR (255) not null,
        styleid smallint(5) unsigned DEFAULT '0' NOT NULL,
        althash CHAR (32) NOT NULL,
        PRIMARY KEY (sessionhash)
        ) TYPE=HEAP;
        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


        • #5
          the first command gave me this error in phpmyadmin:
          Code:
          Database (mydatabase) - Table session running on (myserver)
           
          [b]Error[/b]
          SQL-query :  
          DELETE FROM SESSION 
          MySQL said: 
          
          Table '(mydatabase).SESSION' doesn't exist
          somehow the table name must have corrupted .. i executed the second command successfully. thanks a lot! i think that will work.!!!!

          Comment


          • #6
            still odd though .. when i run a delete from session command, even after rebuilding that table, i still get the original error that (mydatabase).SESSION does not exist.

            Comment


            • #7
              =/ yeah, the problem still exists

              Comment


              • #8
                maybe
                Code:
                [b][color=#990099]TRUNCATE[/color][/b] [color=#008000]`session`[/color]

                Comment


                • #9
                  Originally posted by sde
                  still odd though .. when i run a delete from session command, even after rebuilding that table, i still get the original error that (mydatabase).SESSION does not exist.
                  This is a common problem since the session table is kept in memory. That's why I posted the sercond query.
                  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


                  • #10
                    Ah, session is ofcourse a bit unique, compared to the rest of the vb tables It got me fooled :P

                    Comment

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