https://bugzilla.wikimedia.org/show_bug.cgi?id=31114

       Web browser: ---
             Bug #: 31114
           Summary: "Specified key was too long" error while running php
                    update.php with r97899
           Product: MediaWiki
           Version: 1.19-svn
          Platform: All
        OS/Version: Windows Server 2003
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Maintenance scripts
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


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.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to