Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 152089 - www-apps/mediawiki error: max key length is 1024 bytes
Summary: www-apps/mediawiki error: max key length is 1024 bytes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Philippe Trottier (RETIRED)
URL: http://bugzilla.wikimedia.org/show_bu...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-20 04:24 UTC by Pacho Ramos
Modified: 2008-09-25 13:29 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2006-10-20 04:24:54 UTC
When I try to install mediawiki, I get the following error:
Comment 1 Pacho Ramos gentoo-dev 2006-10-20 04:24:54 UTC
When I try to install mediawiki, I get the following error:
 failed with error code Specified key was too long; max key length is 1024 bytes (localhost).

This can be fixed if maintenance/tables.sql and
maintenance/archives/patch-job.sql are modified like in: http://bugzilla.wikimedia.org/show_bug.cgi?id=4445#c7

-- Jobs performed by parallel apache threads or a command-line daemon
CREATE TABLE /*$wgDBprefix*/job (
job_id int(9) unsigned NOT NULL auto_increment,

-- Command name, currently only refreshLinks is defined
job_cmd varchar(255) NOT NULL default '',

-- Namespace and title to act on
-- Should be 0 and '' if the command does not operate on a title
job_namespace int NOT NULL,
job_title varchar(255) binary NOT NULL,

-- Any other parameters to the command
-- Presently unused, format undefined
job_params blob NOT NULL default '',

PRIMARY KEY job_id (job_id),
KEY (job_cmd(128), job_namespace, job_title(128))
) TYPE=InnoDB;

Thanks a lot for trying to patch mediawiki 

It is valid with mediawiki 1.6.x and 1.7.x branches
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-10-20 04:40:12 UTC
Shrug... why upstream didn't fix this for 10 months?

Comment 3 Daniel Black (RETIRED) gentoo-dev 2006-10-23 01:55:41 UTC
as per bug #139942
Comment 4 Pacho Ramos gentoo-dev 2006-10-23 04:26:44 UTC
I have tested mediawiki-1.6.8 and 1.7.1 and they fail if these lines are not changed :-/
Comment 5 Philippe Trottier (RETIRED) gentoo-dev 2006-12-07 01:27:34 UTC
Obviously something is wrong here, could someone test from a brand new database ? I can't reproduce the problem here, I would need php and mysql use flags and versions.
Comment 6 Pacho Ramos gentoo-dev 2006-12-07 04:48:00 UTC
I am using a mysql database created from scratch. I am using UTF-8 encoding, and the following versions:
[ebuild   R   ] www-apps/mediawiki-1.7.1  USE="imagemagick -math -vhosts" 0 kB
[ebuild   R   ] dev-db/mysql-5.0.26-r1  USE="big-tables latin1 perl ssl -berkdb -cluster -debug -embedded -extraengine -max-idx-128 -minimal (-selinux) -srvd ir -static" 0 kB
[ebuild   R   ] dev-lang/php-5.1.6-r6  USE="apache2 bzip2 cli crypt curl exif ftp iconv ncurses nls pcre pic posix readline reflection session sockets spellspl ssl sysvipc threads truetype unicode xml xpm zip zlib (-adabas) -apache -bcmath -berkdb (-birdstep) -calendar -cdb -cgi -cjk -concurrentmodphp -ctype -curlwrappers -db2 -dbase (-dbmaker) -debug -discard-path -doc (-empress) (-empress-bcs) (-esoob) -fastbuild (-fdftk) (-filepro) -firebird -flatfile -force-cgi-redirect (-frontbase) -gd -gd-external -gdbm -gmp -hardenedphp -hash -hyperwave-api -imap (-informix) -inifile -interbase -iodbc -ipv6 -java-external -kerberos -ldap -libedit -mcve -memlimit -mhash -ming -msql -mssql -mysql -mysqli -oci8 (-oci8-instant-client) -odbc -pcntl -pdo -pdo-external -postgres -qdbm -recode -sapdb -sasl -sharedext -sharedmem -simplexml -snmp -soap (-solid) -sqlite (-sybase) (-sybase-ct) -tidy -tokenizer -vm-goto -vm-switch -wddx -xmlreader -xmlrpc -xmlwriter -xsl -yaz" 0 kB

Thanks a lot
Comment 7 Philippe Trottier (RETIRED) gentoo-dev 2006-12-08 04:27:54 UTC
I have now just tried with 1.8.2 and 1.7.1, they both give me something successful.

I have tried both update and new db.


http://www.tchiwam.net/mediawiki/ if you want to see ...

[ebuild   R   ] dev-lang/php-5.1.6-r6  USE="apache2 berkdb bzip2 cgi cli crypt exif gdbm gmp iconv imap ldap ming mysql ncurses nls pcre pic readline reflection sasl session snmp sockets spell spl sqlite ssl truetype unicode xml zip zlib (-adabas) -apache -bcmath (-birdstep) -calendar -cdb -cjk -concurrentmodphp -ctype -curl -curlwrappers (-db2) -dbase (-dbmaker) -debug -discard-path -doc (-empress) (-empress-bcs) (-esoob) -fastbuild (-fdftk) (-filepro) -firebird -flatfile -force-cgi-redirect (-frontbase) -ftp -gd -gd-external -hardenedphp -hash (-hyperwave-api) (-informix) -inifile -interbase -iodbc -ipv6 (-java-external) -kerberos (-libedit) -mcve -memlimit -mhash -msql -mssql -mysqli (-oci8) (-oci8-instant-client) -odbc -pcntl -pdo -pdo-external -posix -postgres -qdbm -recode -sapdb -sharedext -sharedmem -simplexml -soap (-solid) (-sybase) (-sybase-ct) -sysvipc -threads -tidy -tokenizer -vm-goto -vm-switch -wddx -xmlreader -xmlrpc -xmlwriter -xpm -xsl -yaz"

[ebuild   R   ] dev-db/mysql-5.0.26-r1  USE="berkdb perl ssl -big-tables -cluster -debug -embedded -extraengine -latin1 -max-idx-128 -minimal (-selinux) -srvdir -static"

[ebuild   R   ] net-www/apache-2.0.58-r2  USE="apache2 ldap ssl -debug -doc -mpm-itk -mpm-leader (-mpm-peruser) -mpm-prefork -mpm-threadpool -mpm-worker (-selinux) -static-modules -threads (-no-suexec%)"



    * PHP 5.1.6-pl4-gentoo installed
    * Found database drivers for: MySQL
    * PHP server API is apache2handler; ok, using pretty URLs (index.php/Page_Title)
    * Have XML / Latin1-UTF-8 conversion support.
    * PHP is configured with no memory_limit.
    * Have zlib support; enabling output compression.
    * Couldn't find Turck MMCache, eAccelerator or APC. Object caching functions cannot be used.
    * Found GNU diff3: /usr/bin/diff3.
    * Found ImageMagick: /usr/bin/convert; image thumbnailing will be enabled if you enable uploads.
    * Found GD graphics library built-in.
    * Installation directory: /var/www/www.tchiwam.net/htdocs/mediawiki
    * Script URI path: /mediawiki
    * Environment checked. You can install MediaWiki.

      Generating configuration file...
    * Database type: MySQL
    * Loading class: DatabaseMysql
    * Attempting to connect to database server as root...success.
    * Connected to 4.1.21-log
    * Database wikidb exists
    * There are already MediaWiki tables in this database. Checking if updates are needed...
    * Granting user permissions...

      ...hitcounter table already exists.
      ...querycache table already exists.
      ...objectcache table already exists.
      ...categorylinks table already exists.
      ...logging table already exists.
      ...user_newtalk table already exists.
      ...transcache table already exists.
      ...trackbacks table already exists.
      ...externallinks table already exists.
      ...job table already exists.
      ...langlinks table already exists.
      ...querycache_info table already exists.
      ...filearchive table already exists.
      ...have ipb_id field in ipblocks table.
      ...have ipb_expiry field in ipblocks table.
      ...have rc_type field in recentchanges table.
      ...have rc_ip field in recentchanges table.
      ...have rc_id field in recentchanges table.
      ...have rc_patrolled field in recentchanges table.
      ...have user_real_name field in user table.
      ...have user_token field in user table.
      ...have user_email_token field in user table.
      ...have user_registration field in user table.
      ...have log_params field in logging table.
      ...have ar_rev_id field in archive table.
      ...have ar_text_id field in archive table.
      ...have page_len field in page table.
      ...have rev_deleted field in revision table.
      ...have img_width field in image table.
      ...have img_metadata field in image table.
      ...have img_media_type field in image table.
      ...have ss_total_pages field in site_stats table.
      ...have iw_trans field in interwiki table.
      ...have ipb_range_start field in ipblocks table.
      ...have ss_images field in site_stats table.
      Adding ipb_anon_only field to table ipblocks...ok
      ...already have interwiki table
      ...indexes seem up to 20031107 standards
      Already have pagelinks; skipping old links table updates.
      ...image primary key already set.
      The watchlist table is already set up for email notification.
      ...watchlist talk page rows already present
      ...user table does not contain old email authentication field.
      Logging table has correct title encoding.
      ...page table already exists.
      revision timestamp indexes already up to 2005-03-13
      ...rev_text_id already in place.
      ...page_namespace is already a full int (int(11)).
      ...ar_namespace is already a full int (int(11)).
      ...rc_namespace is already a full int (int(11)).
      ...wl_namespace is already a full int (int(11)).
      ...qc_namespace is already a full int (int(11)).
      ...log_namespace is already a full int (int(11)).
      ...already have pagelinks table.
      ...templatelinks table already exists
      No img_type field in image table; Good.
      Already have unique user_name index.
      ...user_groups table already exists.
      ...user_groups is in current format.
      ...wl_notificationtimestamp is already nullable.
      ...timestamp key on logging already exists.
      Setting page_random to a random value on rows where it equals 0...changed 0 rows
      Checking for additional recent changes indices...
      ...index on ( rc_namespace, rc_user_text ) not found; creating
      Initialising "MediaWiki" namespace for language code en...
      Done. Updated: 17, inserted: 109, kept: 1369.

    * Finished update checks.

      Creating LocalSettings.php...

      Installation successful! Move the config/LocalSettings.php file into the parent directory, then follow this link to your wiki.


Comment 8 Philippe Trottier (RETIRED) gentoo-dev 2006-12-08 04:31:51 UTC
New db: 

Please include all of the lines below when reporting installation problems.

    * PHP 5.1.6-pl4-gentoo installed
    * Found database drivers for: MySQL
    * PHP server API is apache2handler; ok, using pretty URLs (index.php/Page_Title)
    * Have XML / Latin1-UTF-8 conversion support.
    * PHP is configured with no memory_limit.
    * Have zlib support; enabling output compression.
    * Couldn't find Turck MMCache, eAccelerator or APC. Object caching functions cannot be used.
    * Found GNU diff3: /usr/bin/diff3.
    * Found ImageMagick: /usr/bin/convert; image thumbnailing will be enabled if you enable uploads.
    * Found GD graphics library built-in.
    * Installation directory: /var/www/www.tchiwam.net/htdocs/mediawiki
    * Script URI path: /mediawiki
    * Environment checked. You can install MediaWiki.

      Generating configuration file...
    * Database type: MySQL
    * Loading class: DatabaseMysql
    * Attempting to connect to database server as root...success.
    * Connected to 4.1.21-log
    * Created database test2
    * Creating tables... using MySQL 4 table defs... done.
    * Initializing data...
    * Granting user permissions to wikiuser on test2...success.
    * Created sysop account WikiSysop.
    * Initialising "MediaWiki" namespace for language code en...
    * Done. Updated: 0, inserted: 1495, kept: 0.

      Creating LocalSettings.php...

      Installation successful! Move the config/LocalSettings.php file into the parent directory, then follow this link to your wiki.
Comment 9 Philippe Trottier (RETIRED) gentoo-dev 2006-12-08 04:35:59 UTC
FYI I have patched both mysql5 and mysql4 for the key problem in 1.7.1 and 1.8.2 so they might work better, I didn't bump the versions as if someone had this problem he/she could not have installed it previously.
Comment 10 Philippe Trottier (RETIRED) gentoo-dev 2006-12-11 02:54:30 UTC
I've just changed the patch for 1.8.2, it might solve more problems when someone is having mysql5 created table. The older patches only handle mysql4 created db used with mysql5 and Mysql4 created db used with mysql4. Not mysql5 created used with mysql5.

This should take care of both. Anyone elses comments are very welcome.
Comment 11 Philippe Trottier (RETIRED) gentoo-dev 2006-12-12 11:40:39 UTC
Let's reopen this later if anyone else has problems again... I believe the 1 or 2 of those who had the problem worked around it already.
Comment 12 Peter Volkov (RETIRED) gentoo-dev 2008-09-25 13:29:19 UTC
Ok this patch was dropped some time ago in mediawiki and now I drop even comments in ebuild and patch from CVS.

trapni in comments you've asked why this patch was required well you see this bug...

If interested why it's not required any more read this bug:
http://bugs.mysql.com/bug.php?id=2130