Last modified: 2014-02-15 14:17:06 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 T33114, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31114 - patch-globaltemplatelinks.sql: "Specified key was too long" error while running php update.php with r97899
patch-globaltemplatelinks.sql: "Specified key was too long" error while runni...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Maintenance scripts (Other open bugs)
1.20.x
All Windows Server 2003
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-23 09:10 UTC by Dmitriy Sintsov
Modified: 2014-02-15 14:17 UTC (History)
3 users (show)

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


Attachments

Description Dmitriy Sintsov 2011-09-23 09:10:34 UTC
The site uses MySQL MyISAM tables with utf8_general_ci collation.

MySQL settings in LocalSettings.php:

# MySQL table options to use during installation or update
$wgDBTableOptions   = "ENGINE=MyISAM, DEFAULT CHARSET=utf8";

# Experimental charset support for MySQL 4.1/5.0.
$wgDBmysql5 = false;

While running php update.php I get the following error:
Creating globaltemplatelinks table...A database query syntax error has occurred.

The last attempted database query was:
"CREATE UNIQUE INDEX gtl_to_from ON `wiki_globaltemplatelinks` (gtl_to_prefix, g
tl_to_namespace, gtl_to_title, gtl_from_wiki, gtl_from_page)
"
from within function "DatabaseBase::sourceFile( E:\www\phase3/maintenance/archiv
es/patch-globaltemplatelinks.sql )".
Database returned error "1071: Specified key was too long; max key length is 100
0 bytes (localhost)"

Fixed it by changing the indexs to:
CREATE UNIQUE INDEX /*i*/gtl_to_from ON /*_*/globaltemplatelinks (gtl_to_prefix, gtl_to_namespace, gtl_to_title(196), gtl_from_wiki, gtl_from_page);
CREATE UNIQUE INDEX /*i*/gtl_from_to ON /*_*/globaltemplatelinks (gtl_from_wiki, gtl_from_page, gtl_to_prefix, gtl_to_namespace, gtl_to_title(196));

However I feel it is not good, because the index is unique.

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


Navigation
Links