On upgrading, three of the queries fail:

# Failed: 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, DROP INDEX `ForumIDLastPost`

user warning: Unknown column 'Created_drupal' in 'F_Threads' query

# Failed: UPDATE {F_Threads} SET `Created_drupal`=UNIX_TIMESTAMP(`Created`), `LastPost_drupal`=UNIX_TIMESTAMP(`LastPost`)

user warning: Unknown column 'Created_drupal' in 'field list' query:

# Failed: 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`)

user warning: Can't DROP 'ForumIDLastPost'; check that column/key exists

I've analyzed the problem, and it appears that the cause of the failure is the ', DROP INDEX ...' on the first query. There should be four queries, so that if the index being dropped doesn't exist, the first query won't fail:

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

DROP INDEX `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`)

CommentFileSizeAuthor
#1 uieforum_install.patch1.43 KBrernst

Comments

rernst’s picture

StatusFileSize
new1.43 KB

and here's a patch

daniel.hunt’s picture

Assigned: Unassigned » daniel.hunt
Priority: Normal » Critical
Status: Active » Fixed

You seem to have downloaded an older version (possibly before today's tar-run)
Thanks for the bug report though - greatly appreciated.

I've made one minor change to the second line you added:
$items[] = update_sql("DROP INDEX IF EXISTS `ForumIDLastPost`");

Thanks,
Daniel

rernst’s picture

It appears that I did, though today's date wasn't showing up when I loaded the front page. Must have been a caching issue. Ah well

daniel.hunt’s picture

No harm done anyway :)

Anonymous’s picture

Status: Fixed » Closed (fixed)