Closed (fixed)
Project:
UIE Forum
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
25 Jul 2007 at 17:13 UTC
Updated:
12 Aug 2007 at 15:17 UTC
The current tarball (2007-Jul-25) has a bug causing the update.php to fail:
The Index 'ForumIDLastPost' is being dropped tho it hasn't been in the default install yet, i.e. doesn't exist on my/many systems.
So please change it from
DROP INDEX `ForumIDLastPost`
to:
DROP INDEX IF EXISTS `ForumIDLastPost`
Manual updating (ignoring the DROP INDEX) works fine.
Comments
Comment #1
daniel.hunt commentedFixed - thanks for that Melereg
Daniel
Comment #2
tkgafs commentedthis still seems to failing on my system see following output from running the update script on my system
I upgraded my main site to drupal 5.2 then upgraded to the 27th July version of uieforum
The following queries were executed
uieforum module
Update #1
* DROP TABLE IF EXISTS {F_Subs}
* ALTER TABLE {F_Threads} ADD COLUMN `Created_drupal` int(11) NOT NULL default '0' AFTER Created, ADD COLUMN `LastPost_drupal` int(11) NOT NULL default '0' AFTER LastPost
----> * Failed: ALTER TABLE {F_Threads} DROP INDEX IF EXISTS `ForumIDLastPost`
* UPDATE {F_Threads} SET `Created_drupal`=UNIX_TIMESTAMP(`Created`), `LastPost_drupal`=UNIX_TIMESTAMP(`LastPost`)
* ALTER TABLE {F_Threads} DROP COLUMN `Created`, DROP COLUMN `LastPost`, CHANGE COLUMN `Created_drupal` `Created` int(11) NOT NULL default '0', CHANGE COLUMN `LastPost_drupal` `LastPost` int(11) NOT NULL default '0', ADD INDEX `Created` (`Created`), ADD INDEX `LastPost` (`LastPost`), ADD INDEX `ForumIDLastPost` (`ForumID`,`LastPost`)
* ALTER TABLE {F_Posts} ADD COLUMN `Posted_drupal` int(11) NOT NULL default '0' AFTER `Posted`, ADD COLUMN `Edit_drupal` int(11) NOT NULL default '0' AFTER `Edit`
* UPDATE {F_Posts} SET `Posted_drupal`=UNIX_TIMESTAMP(`Posted`), `Edit_drupal`=UNIX_TIMESTAMP(`Edit`)
* ALTER TABLE {F_Posts} DROP COLUMN `Posted`, DROP COLUMN `Edit`, CHANGE COLUMN `Posted_drupal` `Posted` int(11) NOT NULL default '0', CHANGE COLUMN `Edit_drupal` `Edit` int(11) NOT NULL default '0', ADD INDEX `Posted` (`Posted`)
tkgafs
Comment #3
daniel.hunt commentedThanks for the update.
I intended to reply to this issue again this morning, but was drawn out before I could. I've separated the DROP INDEX statement, and made it a separate command.
This way, the update to the database will still go ahead correctly (albeit, with this error) - The reason for this change is because not all MySQL servers seem to like DROP INDEX IF EXISTS.
I'll gladly put it back if someone can explain why the update failed on my home test machine with IF EXISTS :)
Either way, the update should still have been successful for you, even if it gave this error!
Comment #4
(not verified) commented