• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 3.x Series
    • Bug
    • Invalid SQL Error 1060 when updating tables

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: Invalid SQL Error 1060 when updating tables

    • Issue Tools
      • View Changes
    1. issueid=47 April 18, 2008 10:05 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      Invalid SQL Error 1060 when updating tables

      Code:
      Updating Tables
      
          * Modifying: nuwiki_ceslink
            string(250) "ALTER TABLE vb4_nuwiki_ceslink ADD textid INT(11) UNSIGNED NOT NULL DEFAULT '0', ADD templateusage INT(1) UNSIGNED NOT NULL DEFAULT '0', ADD targetid INT(10) UNSIGNED NOT NULL DEFAULT '0', ADD INDEX textid (textid), ADD INDEX targetid (targetid)"
      
      Database error in vBulletin 3.7.0 Release Candidate 3:
      
      Invalid SQL:
      ALTER TABLE vb4_nuwiki_ceslink
      ADD textid INT(11) UNSIGNED NOT NULL DEFAULT '0',
      ADD templateusage INT(1) UNSIGNED NOT NULL DEFAULT '0',
      ADD targetid INT(10) UNSIGNED NOT NULL DEFAULT '0',
      ADD INDEX textid (textid),
      ADD INDEX targetid (targetid);
      
      MySQL Error   : Duplicate column name 'textid'
      Error Number  : 1060
      Date          : Saturday, April 19th 2008 @ 03:59:52 AM
      Script        : hxxp://www.mysite.com/forum/admincp/plugin.php?do=productimport
      Referrer      : hxxp://www.mysite.com/forum/admincp/plugin.php?do=productadd
      IP Address    : xxxx
      Username      : Alfa1
      Classname     : vB_Database
      MySQL Version : 5.0.45
    Issue Details
    Issue Number 47
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category Install / Upgrade
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 2.0.0 Beta 1
    Fixed Version 2.0.0 Beta 2
    Milestone (none)
    Software DependencyAny
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 1
    Assigned Users pegasus
    Tags (none)




    1. April 18, 2008 11:10 PM
      pegasus pegasus is offline
      VaultWiki Team
      This happened because a previous attempt at installation failed before completion. As a result, the MySQL tables were already modified, but no record of the product installation was made, so it was not possible to reverse the changes that were made.

      You will keep receiving the same messages until you restore your database to its structure before the first installation attempt. To do this, you can either restore a backup, or look through the code of special_install.php to see what changes were made, and remove those changes manually.

      For example, to fix this query, you would have to DROP the textid field from nuwiki_ceslink. However, if this were the only change you made, you would likely get another error on a different field, because this was only the first duplicate encountered.
      Reply Reply  
    2. April 18, 2008 11:32 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      OK. I will check how to restore the backup of the sql and try installing this again when the backup is running again.
      Reply Reply  
    3. April 19, 2008 12:33 AM
      pegasus pegasus is offline
      VaultWiki Team
      I have updated special_install.php to attempt to prevent duplicate entry DB errors in the future. While I could have just used $db->hide_errors(), I find that in beta at least, it's generally nice to know when there's an error.

      The new special_install.php is attached for those daring enough to try it. Otherwise, you should just uncomment the $db->hide_errors calls in your existing file.
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 7:19 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2023 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2023 DragonByte Technologies Ltd.
    Copyright © 2008 - 2013 VaultWiki Team, Cracked Egg Studios, LLC.