Announcement

Collapse
No announcement yet.

Database error in vBulletin 4.1.2

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

  • [Forum] Database error in vBulletin 4.1.2

    Hi Guys,

    My forum has been closed due to an unexpected database error, this error occurs when trying to access the UserCP, can someone please tell me how to sort this out.

    Database error in vBulletin 4.1.2:

    Invalid SQL:

    SELECT contenttype.contenttypeid AS itemid

    FROM _vbcontenttype AS contenttype
    INNER JOIN _vbpackage AS package
    ON package.packageid = contenttype.packageid LEFT JOIN _vbproduct AS product
    ON product.productid = package.productid
    WHERE
    1 = 1 AND (product.active = '1' OR package.productid = 'vbulletin') AND contenttype.canattach = '1';

    MySQL Error : Incorrect information in file: './xxxx_forumdb/_vbcontenttype.frm'
    Error Number : 1033
    Request Date : Sunday, May 29th 2011 @ 05:00:37 PM
    Error Date : Sunday, May 29th 2011 @ 05:00:37 PM
    Script : http://www.forum.xxxxx.comprofile.php?do=editpassword
    Referrer :
    IP Address : XXXXXX
    Username : XXXXX
    Classname : vB_Database
    MySQL Version : 5.0.92-community

  • #2
    First we need to get rid of the current table, since it can't be repaired. Run this query:

    DROP TABLE _vbcontenttype;

    Then we need to create it again:

    CREATE TABLE _vbcontenttype (
    contenttypeid INT UNSIGNED NOT NULL AUTO_INCREMENT,
    class VARBINARY(50) NOT NULL,
    packageid INT UNSIGNED NOT NULL,
    canplace ENUM('0','1') NOT NULL DEFAULT '0',
    cansearch ENUM('0','1') NOT NULL DEFAULT '0',
    cantag ENUM('0','1') DEFAULT '0',
    canattach ENUM('0','1') DEFAULT '0',
    isaggregator ENUM('0', '1') NOT NULL DEFAULT '0',
    PRIMARY KEY (contenttypeid),
    UNIQUE KEY packageclass (packageid, class)
    );


    Next you'll need to populate it:

    INSERT INTO `_vbcontenttype` (`contenttypeid`, `class`, `packageid`, `canplace`, `cansearch`, `cantag`, `canattach`, `isaggregator`) VALUES
    (1, 'Post', 1, '0', '1', '0', '1', '0'),
    (2, 'Thread', 1, '0', '0', '1', '0', '0'),
    (3, 'Forum', 1, '0', '1', '0', '0', '0'),
    (4, 'Announcement', 1, '0', '0', '0', '0', '0'),
    (5, 'SocialGroupMessage', 1, '0', '1', '0', '0', '0'),
    (6, 'SocialGroupDiscussion', 1, '0', '0', '0', '0', '0'),
    (7, 'SocialGroup', 1, '0', '1', '0', '1', '0'),
    (8, 'Album', 1, '0', '0', '0', '1', '0'),
    (9, 'Picture', 1, '0', '0', '0', '0', '0'),
    (10, 'PictureComment', 1, '0', '0', '0', '0', '0'),
    (11, 'VisitorMessage', 1, '0', '1', '0', '0', '0'),
    (12, 'User', 1, '0', '0', '0', '0', '0'),
    (13, 'Event', 1, '0', '0', '0', '0', '0'),
    (14, 'Calendar', 1, '0', '0', '0', '0', '0');
    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
      Got another issue as I am trying to edit forum sections.

      Database error in vBulletin 4.1.2:

      Invalid SQL:
      INSERT INTO _vbsearchgroup (username, contenttypeid, groupid, userid, dateline)
      VALUES ( '', 3, 16, 0, 0 )
      ON DUPLICATE KEY UPDATE username = VALUES(username), contenttypeid = VALUES(contenttypeid), groupid = VALUES(groupid), userid = VALUES(userid), dateline = VALUES(dateline);

      MySQL Error : Incorrect information in file: './xxxxx_forumdb/_vbsearchgroup.frm'
      Error Number : 1033
      Request Date : Sunday, May 29th 2011 @ 07:26:02 PM
      Error Date : Sunday, May 29th 2011 @ 07:26:02 PM
      Script : http://www.forum.xxxxx.info/admincp/forum.php?do=update
      Referrer : http://www.forum.xxxxx.info/admincp/...o=edit&f=16&s=
      IP Address : xxxxxx
      Username : My Username
      Classname : vB_Database
      MySQL Version : 5.0.92-community
      Last edited by ★Jigsaw; Sun 29th May '11, 4:30pm.

      Comment


      • #4
        It looks like you may have a serious server issue with InnoDB tables.

        You need to drop that table:

        drop table _vbsearchgroup;


        Then recreate it:

        CREATE TABLE _vbsearchcore (
        searchcoreid INT UNSIGNED NOT NULL AUTO_INCREMENT,
        contenttypeid INT UNSIGNED NOT NULL,
        primaryid INT UNSIGNED NOT NULL,
        groupcontenttypeid INT UNSIGNED NOT NULL,
        groupid INT UNSIGNED NOT NULL DEFAULT 0,
        dateline INT UNSIGNED NOT NULL DEFAULT 0,
        userid INT UNSIGNED NOT NULL DEFAULT 0,
        username VARCHAR(100) NOT NULL,
        ipaddress INT UNSIGNED NOT NULL,
        searchgroupid INT UNSIGNED NOT NULL,
        PRIMARY KEY (searchcoreid),
        UNIQUE KEY contentunique (contenttypeid, primaryid),
        KEY groupid (groupcontenttypeid, groupid),
        KEY ipaddress (ipaddress),
        KEY dateline (dateline),
        KEY userid (userid),
        KEY searchgroupid (searchgroupid)
        ) ;


        After that you should change any InnoDB tables to MyISAM.
        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
          I have no table types which are InnoDB they are all MyISAM with 2 or 3 MEMORY type tables. As for the _vbsearchgroup table, I've done what you said however it now says Error: Table 'xxxxx_forumdb._vbsearchlog' doesn't exist. And am 100% sure I recreated it, after I recreated it said "Your SQL query has been executed successfully ( Query took 0.2629 sec )". Do you think I have to populate the table?

          I done a database scan in vBulletin and stumbled accross these bad database files.

          Error: Incorrect information in file: './xxxxxx_forumdb/_vbtag.frm'

          Error: Incorrect information in file: './xxxxx_forumdb/_vbtagcontent.frm'

          Comment


          • #6
            You really need to speak to your host if you're having so many different errors with your database.
            Vote for:

            - *Admin Settable Paid Subscription Reminder Timeframe*
            -
            *PM - Add ability to reply to originator only*
            - Add Admin ability to auto-subscribe users to specific channel(s)
            - Highlight the correct navigation tab when you are on a custom page
            - "Quick Route" Interface...
            - Allow to use custom icons for individual forums

            Comment


            • #7
              It's not the host, I moved my forum quite allot around which would probably be the cause of this. I only need 3 database tables fixed its not "so many".

              Comment


              • #8
                Check the '.../install/mysql-schema.php' file for the queries to recreate those tables.
                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

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