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`)
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | uieforum_install.patch | 1.43 KB | rernst |
Comments
Comment #1
rernst commentedand here's a patch
Comment #2
daniel.hunt commentedYou 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
Comment #3
rernst commentedIt 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
Comment #4
daniel.hunt commentedNo harm done anyway :)
Comment #5
(not verified) commented