Announcement

Collapse
No announcement yet.

Duplicate entry '0' for key 1 issue

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

  • Duplicate entry '0' for key 1 issue

    I am having problems after a server move and database downgrade. Everytime I post a topic the entry generates this SQL error.

    Code:
     
    Database error in vBulletin 3.5.1:Invalid SQL:INSERT INTO vb3_post	(showsignature, allowsmilie, username, userid, title, pagetext, iconid, visible, parentid, threadid, proxyip, dateline, ipaddress, attach)VALUES	(0, 1, 'admin', 1, 'Just a reply', 'Nothing more just testing things...', 0, 1, 0, 224, 'PROXYIP', 1135196191, '209.232.174.26', 0);MySQL Error  : Duplicate entry '0' for key 1Error Number : 1062Date         : Wednesday, December 21st 2005 @ 12:16:32 PMScript       : [URL="http://www.surfthisphotography.com/forums/newreply.php"][COLOR=#800080]http://www.surfthisphotography.com/forums/newreply.php[/COLOR][/URL]Referrer     : [URL="http://www.surfthisphotography.com/forums/newreply.php?do=newreply&t=224"][COLOR=#800080]http://www.surfthisphotography.com/forums/newreply.php?do=newreply&t=224[/COLOR][/URL]IP Address   : xxxxxxxxxxUsername     : adminClassname    : vb_database
    I have also reuploaded the original VB files...

    Please help!!

    Thank you,
    ::B i l l B e n s e n::
    Founder and Senior Editor
    www.Surfthisphotography.com
    e: [email protected]
    icq: 132161316
    m$n: [email protected]

  • #2
    Proxyip is not a vBulletin table, please disable all of your plugins or revert to the original vBulletin files and see if this works.

    Comment


    • #3
      Hey Zach!

      I disabled what I thought was the offending plugin, but I still get this error...

      Code:
      Database error in vBulletin 3.5.1:
      Invalid SQL:
      INSERT INTO vb3_post
       (showsignature, allowsmilie, username, userid, title, pagetext, iconid, visible, dateline, ipaddress, attach, threadid)
      VALUES
       (0, 1, 'admin', 1, 'Still testing', 'This is still a test', 0, 1, 1135207668, '209.232.174.26', 0, -1);
      MySQL Error  : Duplicate entry '0' for key 1
      Error Number : 1062
      Date         : Wednesday, December 21st 2005 @ 03:27:49 PM
      Script       : [URL="http://www.surfthisphotography.com/forums/newthread.php"]http://www.surfthisphotography.com/forums/newthread.php[/URL]
      Referrer     : [URL="http://www.surfthisphotography.com/forums/newthread.php?do=newthread&f=26"]http://www.surfthisphotography.com/forums/newthread.php?do=newthread&f=26[/URL]
      IP Address   : xxxx
      Username     : admin
      Classname    : vb_database
      ::B i l l B e n s e n::
      Founder and Senior Editor
      www.Surfthisphotography.com
      e: [email protected]
      icq: 132161316
      m$n: [email protected]

      Comment


      • #4
        It looks like one of your hacks or plugins messed up your post table. Look at the post table and see if it shows as 'auto-incremented' or not.
        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
          Hello Steve,

          It appears that my sql dump didn't create any auto-increment fields. Here's a small portion of it. What can I do to repair this??

          Code:
          [SIZE=2]
          DROP TABLE IF EXISTS `vb3_post`;
          CREATE TABLE `vb3_post` (
          `postid` int(10) unsigned NOT NULL,
          `threadid` int(10) unsigned NOT NULL default '0',
          `parentid` int(10) unsigned NOT NULL default '0',
          `username` varchar(100) NOT NULL default '',
          `userid` int(10) unsigned NOT NULL default '0',
          `title` varchar(250) NOT NULL default '',
          `dateline` int(10) unsigned NOT NULL default '0',
          `pagetext` mediumtext NOT NULL,
          `allowsmilie` smallint(6) NOT NULL default '0',
          `showsignature` smallint(6) NOT NULL default '0',
          `ipaddress` varchar(15) NOT NULL default '',
          `proxyip` varchar(20) NOT NULL default '',
          `iconid` smallint(5) unsigned NOT NULL default '0',
          `visible` smallint(6) NOT NULL default '0',
          `attach` smallint(5) unsigned NOT NULL default '0',
          PRIMARY KEY (`postid`),
          KEY `userid` (`userid`),
          KEY `threadid` (`threadid`,`userid`),
          KEY `dateline` (`dateline`)
          ) TYPE=MyISAM;
          [/SIZE]
          ::B i l l B e n s e n::
          Founder and Senior Editor
          www.Surfthisphotography.com
          e: [email protected]
          icq: 132161316
          m$n: [email protected]

          Comment


          • #6
            If this happpened on every field that is auto-incremented, then this is a major problem. Is this true for postid, threadid, forumid, etc?
            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


            • #7
              Steve,

              Yes this did happen to every table that had an auto incrementing flag set. How it happened is this; The original forum was on a mysql 4.1.14 version database, the new host is on a 3.23.54 version. I had to use the dump command with the compatibility option and it looks as if that hosed the tables. I manually added the auto_increment back to the tables, since I had my 4.1.14 dump I used it as a ref.

              The site is back up and working, I can't thank you enough for pointing me in that direction!!

              Bill Bensen
              ::B i l l B e n s e n::
              Founder and Senior Editor
              www.Surfthisphotography.com
              e: [email protected]
              icq: 132161316
              m$n: [email protected]

              Comment


              • #8
                Glad you sorted it out.
                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


                • #9
                  ahhh im getting the exact same error now.. what should i do??? im a complete newbie to this sort of stuff, need clear guidance.. some one please help!!

                  Database error in vBulletin 3.5.3:

                  Invalid SQL:
                  INSERT INTO vb3_post
                  (showsignature, allowsmilie, username, userid, title, pagetext, iconid, visible, parentid, threadid, dateline, ipaddress, attach) VALUES
                  (1, 1, 'TwiZteD', 1639, '', 'parminder', 0, 1, 15110, 604, 1140628506, '70.72.68.85', 0);

                  MySQL Error : Duplicate entry '138627' for key 1 Error Number : 1062

                  Comment


                  • #10
                    Run these queries to reset the auto-incrementing:

                    Code:
                    ALTER TABLE `adminhelp` CHANGE `adminhelpid` `adminhelpid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `adminlog` CHANGE `adminlogid` `adminlogid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `announcement` CHANGE `announcementid` `announcementid` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `attachment` CHANGE `attachmentid` `attachmentid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `avatar` CHANGE `avatarid` `avatarid` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `bbcode` CHANGE `bbcodeid` `bbcodeid` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `calendar` CHANGE `calendarid` `calendarid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `calendarcustomfield` CHANGE `calendarcustomfieldid` `calendarcustomfieldid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `calendarmoderator` CHANGE `calendarmoderatorid` `calendarmoderatorid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `calendarpermission` CHANGE `calendarpermissionid` `calendarpermissionid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `cron` CHANGE `cronid` `cronid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `cronlog` CHANGE `cronlogid` `cronlogid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `event` CHANGE `eventid` `eventid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `forum` CHANGE `forumid` `forumid` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `forumpermission` CHANGE `forumpermissionid` `forumpermissionid` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `holiday` CHANGE `holidayid` `holidayid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `icon` CHANGE `iconid` `iconid` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `imagecategory` CHANGE `imagecategoryid` `imagecategoryid` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `language` CHANGE `languageid` `languageid` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `mailque` CHANGE `mailqueueid` `mailqueueid` INT UNSIGNED NOT NULL AUTO_INCREMENT;
                    ALTER TABLE `moderator` CHANGE `moderatorid` `moderatorid` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `moderatorlog` CHANGE `moderatorlogid` `moderatorlogid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `paymentapi` CHANGE `paymentapiid` `paymentapiid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `paymentinfo` CHANGE `paymentinfoid` `paymentinfoid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `paymenttransaction` CHANGE `paymenttransactionid` `paymenttransactionid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `phrase` CHANGE `phraseid` `phraseid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `plugin` CHANGE `pluginid` `pluginid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `pm` CHANGE `pmid` `pmid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `pmtext` CHANGE `pmtextid` `pmtextid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `poll` CHANGE `pollid` `pollid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `pollvote` CHANGE `pollvoteid` `pollvoteid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `post` CHANGE `postid` `postid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `productcode` CHANGE `productcodeid` `productcodeid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `profilefield` CHANGE `profilefieldid` `profilefieldid` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `ranks` CHANGE `rankid` `rankid` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `reminder` CHANGE `reminderid` `reminderid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `reputation` CHANGE `reputationid` `reputationid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `reputationlevel` CHANGE `reputationlevelid` `reputationlevelid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `search` CHANGE `searchid` `searchid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `smilie` CHANGE `smilieid` `smilieid` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `style` CHANGE `styleid` `styleid` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `subscribeevent` CHANGE `subscribeeventid` `subscribeeventid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `subscribeforum` CHANGE `subscribeforumid` `subscribeforumid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `subscribethread` CHANGE `subscribethreadid` `subscribethreadid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT;
                    ALTER TABLE `subscription` CHANGE `subscriptionid` `subscriptionid` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `subscriptionlog` CHANGE `subscriptionlogid` `subscriptionlogid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `template` CHANGE `templateid` `templateid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `templatehistory` CHANGE `templatehistoryid` `templatehistoryid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `thread` CHANGE `threadid` `threadid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `threadrate` CHANGE `threadrateid` `threadrateid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `upgradelog` CHANGE `upgradelogid` `upgradelogid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `user` CHANGE `userid` `userid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT;
                    ALTER TABLE `useractivation` CHANGE `useractivationid` `useractivationid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AUTO_INCREMENT; 
                    ALTER TABLE `usergroup` CHANGE `usergroupid` `usergroupid` SMALLINT( 5 ) UNSIGNED NOT NULL AUTO_INCREMENT; 
                    ALTER TABLE `usergroupleader` CHANGE `usergroupleaderid` `usergroupleaderid` SMALLINT( 5 ) UNSIGNED NOT NULL AUTO_INCREMENT; 
                    ALTER TABLE `usergrouprequest` CHANGE `usergrouprequestid` `usergrouprequestid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT; 
                    ALTER TABLE `usernote` CHANGE `usernoteid` `usernoteid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT; 
                    ALTER TABLE `usertitle` CHANGE `usertitleid` `usertitleid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT; 
                    ALTER TABLE `userpromotion` CHANGE `userpromotionid` `userpromotionid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT; 
                    ALTER TABLE `word` CHANGE `wordid` `wordid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT;
                    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


                    • #11
                      We upgraded from mysql 3.58 to 4.4 and were getting duplicate id 0 for key 1 errors when posting or replying to threads on vb 3.08. Ran the same queries suggest but dropped the "DEFAULT '0'" part to update all the tables as MySQL was complaining about null default value of 0.

                      Code:
                      ALTER TABLE `adminhelp` CHANGE `adminhelpid` `adminhelpid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `adminlog` CHANGE `adminlogid` `adminlogid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `announcement` CHANGE `announcementid` `announcementid` SMALLINT( 5 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `attachment` CHANGE `attachmentid` `attachmentid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `avatar` CHANGE `avatarid` `avatarid` SMALLINT( 5 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `bbcode` CHANGE `bbcodeid` `bbcodeid` SMALLINT( 5 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `calendar` CHANGE `calendarid` `calendarid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `calendarcustomfield` CHANGE `calendarcustomfieldid` `calendarcustomfieldid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `calendarmoderator` CHANGE `calendarmoderatorid` `calendarmoderatorid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `calendarpermission` CHANGE `calendarpermissionid` `calendarpermissionid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `cron` CHANGE `cronid` `cronid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `cronlog` CHANGE `cronlogid` `cronlogid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `event` CHANGE `eventid` `eventid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `forum` CHANGE `forumid` `forumid` SMALLINT( 5 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `forumpermission` CHANGE `forumpermissionid` `forumpermissionid` SMALLINT( 5 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `holiday` CHANGE `holidayid` `holidayid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `icon` CHANGE `iconid` `iconid` SMALLINT( 5 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `imagecategory` CHANGE `imagecategoryid` `imagecategoryid` SMALLINT( 5 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `language` CHANGE `languageid` `languageid` SMALLINT( 5 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `moderator` CHANGE `moderatorid` `moderatorid` SMALLINT( 5 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `moderatorlog` CHANGE `moderatorlogid` `moderatorlogid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `paymentapi` CHANGE `paymentapiid` `paymentapiid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `paymentinfo` CHANGE `paymentinfoid` `paymentinfoid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `paymenttransaction` CHANGE `paymenttransactionid` `paymenttransactionid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `phrase` CHANGE `phraseid` `phraseid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `plugin` CHANGE `pluginid` `pluginid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `pm` CHANGE `pmid` `pmid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `pmtext` CHANGE `pmtextid` `pmtextid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `poll` CHANGE `pollid` `pollid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `pollvote` CHANGE `pollvoteid` `pollvoteid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `post` CHANGE `postid` `postid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `productcode` CHANGE `productcodeid` `productcodeid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `profilefield` CHANGE `profilefieldid` `profilefieldid` SMALLINT( 5 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `ranks` CHANGE `rankid` `rankid` SMALLINT( 5 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `reminder` CHANGE `reminderid` `reminderid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `reputation` CHANGE `reputationid` `reputationid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `reputationlevel` CHANGE `reputationlevelid` `reputationlevelid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `search` CHANGE `searchid` `searchid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `smilie` CHANGE `smilieid` `smilieid` SMALLINT( 5 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `style` CHANGE `styleid` `styleid` SMALLINT( 5 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `subscribeevent` CHANGE `subscribeeventid` `subscribeeventid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `subscribeforum` CHANGE `subscribeforumid` `subscribeforumid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `subscribethread` CHANGE `subscribethreadid` `subscribethreadid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT;
                      ALTER TABLE `subscription` CHANGE `subscriptionid` `subscriptionid` SMALLINT( 5 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `subscriptionlog` CHANGE `subscriptionlogid` `subscriptionlogid` MEDIUMINT( 8 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `template` CHANGE `templateid` `templateid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `templatehistory` CHANGE `templatehistoryid` `templatehistoryid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `thread` CHANGE `threadid` `threadid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `threadrate` CHANGE `threadrateid` `threadrateid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `upgradelog` CHANGE `upgradelogid` `upgradelogid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `user` CHANGE `userid` `userid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT;
                      ALTER TABLE `useractivation` CHANGE `useractivationid` `useractivationid` INT( 10 ) UNSIGNED NOT NULL  AUTO_INCREMENT; 
                      ALTER TABLE `usergroup` CHANGE `usergroupid` `usergroupid` SMALLINT( 5 ) UNSIGNED NOT NULL AUTO_INCREMENT; 
                      ALTER TABLE `usergroupleader` CHANGE `usergroupleaderid` `usergroupleaderid` SMALLINT( 5 ) UNSIGNED NOT NULL AUTO_INCREMENT; 
                      ALTER TABLE `usergrouprequest` CHANGE `usergrouprequestid` `usergrouprequestid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT; 
                      ALTER TABLE `usernote` CHANGE `usernoteid` `usernoteid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT; 
                      ALTER TABLE `usertitle` CHANGE `usertitleid` `usertitleid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT; 
                      ALTER TABLE `userpromotion` CHANGE `userpromotionid` `userpromotionid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT; 
                      ALTER TABLE `word` CHANGE `wordid` `wordid` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT;
                      Seems to be working now after the query adjustment on the alter table statements to make our MySQL version happy again.
                      Last edited by memdy; Sat 25 Feb '06, 5:31pm.

                      Comment


                      • #12
                        help me please mysql error

                        after downgrade mysql from 4.1.14 to 4.0.25 , i got this error when try to delete or move posts and threads also the threads repeated


                        the error




                        Database error in vBulletin 3.5.4:
                        Invalid SQL:
                        ### INSERT QUERY GENERATED BY fetch_query_sql() ###
                        INSERT INTO moderatorlog
                        (`userid`, `dateline`, `type`, `forumid`, `threadid`, `postid`, `pollid`, `attachmentid`, `ipaddress`, `action`)
                        VALUES
                        ('2198', '1144431021', '15', '74', '45679', '0', '0', '0', '82.178.134.68', '');
                        MySQL Error : Duplicate entry '0' for key 1
                        Error Number : 1062
                        Date : Friday, April 7th 2006 @ 12:30:21 PM
                        Script : http://www.xxxxx.com/vb/inlinemod.php
                        Referrer : http://www.xxxxxx.com/vb/inlinemod.php
                        IP Address : xxxxxxx
                        Username : xxxxxxx
                        Classname : vb_database


                        help me with sloution

                        Comment


                        • #13
                          You really shouldn't downgrade from MySQL's as it does not include any of th auto increment keys.

                          You'll need to use the query Steve posted above to re-add all these.
                          Scott MacVicar

                          My Blog | Twitter

                          Comment


                          • #14
                            Originally posted by Scott MacVicar
                            You really shouldn't downgrade from MySQL's as it does not include any of th auto increment keys.

                            You'll need to use the query Steve posted above to re-add all these.
                            i tried steve posted above and nothing done

                            can you help me more

                            Comment


                            • #15
                              Then you didn't do it right. If you are using a table prefix, you will need to add that prefix in front of the table names for each 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

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