Last modified: 2010-05-15 15:59:44 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T13451, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 11451 - Upgrading from 1.2 to 1.11 fails with Mysql error
Upgrading from 1.2 to 1.11 fails with Mysql error
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
1.11.x
All Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-25 15:56 UTC by Calum
Modified: 2010-05-15 15:59 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Calum 2007-09-25 15:56:13 UTC
Hello, I am following on from bug 11450, and now have this problem.

Query "ALTER TABLE `imagelinks`
 DROP INDEX il_to,
 ADD INDEX il_to(il_to, il_from)
" failed with error code "Specified key was too long; max key length is 1000 bytes (localhost)".


It did complain about imagelinks (or pagelinks?) not existing, but I reloaded the config/index.php and it went on.
However, it's stopping here.

PS. Thanks for the speed fix to the 11450 problem :)
Comment 1 Brion Vibber 2007-09-26 19:16:02 UTC
Hrm.... there should be no way that index is going to be too long. Even if the utf-8 case it'd be like 769 bytes.

Ah, it looks like 1.2 had an older form of the imagelinks table where il_from is a string, which is longer. The new imagelinks table (with page ID for il_from) is present from 1.3.

The updaters seem to be missing the restructuring of the imagelinks table, though. The links table is restructured via do_old_links_update() (via convertLinks.inc), and the index isn't added until do_backlinking_indices_update() later on.

Probably convertLinks.inc needs to be redone to apply the updates on the imagelinks table as well. Surprised nobody's caught this yet; I guess it sort of works even if you leave the string there, unless the index hits you. ;)
Comment 2 Calum 2007-09-26 19:38:43 UTC
I know I'm being a pain, updating from such an old version - sorry about that.

Are there any SQL commands I can run to get past this stage?
Comment 3 Calum 2007-10-09 11:59:39 UTC
Hello - just wondering if there's any quick fix that I can do to get me past this as my Wiki has been down for quite a while.
Comment 4 Brion Vibber 2007-10-15 23:02:58 UTC
Just redo the imagelinks table from tables.sql.
Comment 5 Calum 2007-10-16 14:41:13 UTC
I've rolled back to the old one now.

What do you mean by "redo"? Create?
Comment 6 Tim Starling 2009-05-14 14:16:48 UTC
Fixed in r50580 for release in MW 1.15. Note that you will have to run maintenance/refreshLinks.php after you install if you want the imagelinks table to be populated. 

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links