Strange DB issue in 4.1.11

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Supersix
    Member
    • May 2009
    • 98
    • 3.8.x

    [CMS] Strange DB issue in 4.1.11

    We've built a new 4.1.11 forum and used impexx to import everything from our old 3.8 forum. Everything looks fine, but when I try to comment on a cms article as a normal registered user I get a popup saying "<p>Database Error</p>". I took a look in firebug and the actual error is as follows:

    Code:
    <?xml version="1.0" encoding="windows-1252"?>
      <errors>
        <error><![CDATA[<p>Database Error</p>]]></error>
        <error_html><![CDATA[<p>Database error in vBulletin 4.1.11</p>
          <p>Invalid SQL:INSERT INTO post
                      (showsignature, allowsmilie, htmlstate, username, userid, title, pagetext, iconid, visible, parentid, threadid, dateline, ipaddress, attach)
                      VALUES (0, 1, 'on_nl2br', 'TestUser', 3109, '', 'testing testing', 0, 1, 12448, 2445, 1333040476, 'X.X.X.X', 0);<p>
          <p><strong>MySQL Error</strong>   : Duplicate entry '0' for key 'PRIMARY'<br />
            <strong>Error Number</strong>  : 1062<br />
            <strong>Request Date</strong>  : Thursday, March 29th 2012 @ 01:01:16 PM<br />
            <strong>Error Date</strong>    : Thursday, March 29th 2012 @ 01:01:16 PM<br />
            <strong>Script</strong>        : http://XXX/newreply.php?do=postreply<br />
            <strong>Referrer</strong>      : http://XXX/content.php/119-Welcome-to-the-New-and-Improved-XXX!<br />
            <strong>Classname</strong>     : vB_Database<br /><strong>MySQL Version</strong> : <br />
          </p>]]></error_html>
      </errors>
    It looks to me like the database is confused about the unspecified postid column in that statement. The schema for posts is as follows. I'm not that familiar with vb's tables, but I find it strange that postid is not autoincrement, not null, and yet the default is null. Did our schema get borked somehow?

    Code:
    mysql> desc post;
    +----------------+-----------------------------+------+-----+----------+-------+
    | Field          | Type                        | Null | Key | Default  | Extra |
    +----------------+-----------------------------+------+-----+----------+-------+
    | postid         | int(10) unsigned            | NO   | PRI | NULL     |       |
    | threadid       | int(10) unsigned            | NO   | MUL | 0        |       |
    | parentid       | int(10) unsigned            | NO   |     | 0        |       |
    | username       | varchar(100)                | NO   |     |          |       |
    | userid         | int(10) unsigned            | NO   | MUL | 0        |       |
    | title          | varchar(250)                | NO   |     |          |       |
    | dateline       | int(10) unsigned            | NO   | MUL | 0        |       |
    | pagetext       | mediumtext                  | YES  |     | NULL     |       |
    | allowsmilie    | smallint(6)                 | NO   |     | 0        |       |
    | showsignature  | smallint(6)                 | NO   |     | 0        |       |
    | ipaddress      | char(15)                    | NO   | MUL |          |       |
    | iconid         | smallint(5) unsigned        | NO   |     | 0        |       |
    | visible        | smallint(6)                 | NO   |     | 0        |       |
    | attach         | smallint(5) unsigned        | NO   |     | 0        |       |
    | infraction     | smallint(5) unsigned        | NO   |     | 0        |       |
    | reportthreadid | int(10) unsigned            | NO   |     | 0        |       |
    | htmlstate      | enum('off','on','on_nl2br') | NO   |     | on_nl2br |       |
    | importthreadid | bigint(20)                  | NO   |     | 0        |       |
    | importpostid   | bigint(20)                  | NO   | MUL | 0        |       |
    +----------------+-----------------------------+------+-----+----------+-------+
    19 rows in set (0.00 sec)
    Any help is greatly appreciated!
    vintage airstream|airstream forums
  • Zachery
    Former vBulletin Support
    • Jul 2002
    • 59097

    #2
    You really shouldn't havee used impex to upgrade. Is it possible to just do the upgrade normally?

    Comment

    • Supersix
      Member
      • May 2009
      • 98
      • 3.8.x

      #3
      We have well over 40 hours of labor into setting up the new board and this cropped up during our final pre-launch QA. If there is a way to fix the problem instead of just starting over it would be vastly preferable. Is the schema for post that I included above correct?

      Everything except for this is working great.
      vintage airstream|airstream forums

      Comment

      • Zachery
        Former vBulletin Support
        • Jul 2002
        • 59097

        #4
        We do not provide support (in any manner) for impex upgrades. Impex is not an upgrade tool, its a tool that is supposed to be used to import data from third party software into vBulletin, or merge two active forums into one.
        You've also killed many of your urls based on their unique ids that have now changed by using impex to upgrade.

        If you ran a repair/optimize on the tables, there is a known bug dropping the auto_incriment value on inodb tables. You can view the default vB schema in the install/mysql-schema.php file.

        My honest suggestion, is to do the upgrade the proper way, and skip impex, and import your styles/plugins between the two installs once done.

        Comment

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