Last modified: 2010-05-15 15:34:02 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 T5013, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 3013 - Installer attempting to alter table that doesn't exist yet
Installer attempting to alter table that doesn't exist yet
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
1.4.x
Other Linux
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
: utf8
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-08-02 18:14 UTC by Phade
Modified: 2010-05-15 15:34 UTC (History)
0 users

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


Attachments

Description Phade 2005-08-02 18:14:32 UTC
MediaWiki 1.4.7 installation

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

    * PHP 4.3.9: ok
    * PHP server API is apache2handler; ok, using pretty URLs (index.php/Page_Title)
    * Have XML / Latin1-UTF-8 conversion support.
    * PHP's memory_limit is 11M. If this is too low, installation may fail!
Attempting to raise limit to 20M... ok.
    * Have zlib support; enabling output compression.
    * Turck MMCache not installed, can't use object caching functions
    * Found ImageMagick: /usr/bin/convert; image thumbnailing will be enabled if
you enable uploads.
    * Found GD graphics library built-in.
    * Installation directory: /var/www/dev/info
    * Script URI path: /info
    * MySQL error 1045: Access denied for user 'root'@'localhost' (using
password: NO)
    * Trying regular user... ok.
    * Connected to database... 4.1.10a-log; enabling MySQL 4 enhancements
    * Database info exists
    * There are already MediaWiki tables in this database. Checking if updates
are needed...

...linkscc table already exists.
...hitcounter table already exists.
...querycache table already exists.
...objectcache table already exists.
...categorylinks table already exists.
...logging table already exists.
...user_rights table already exists.
Adding ipb_id field to table ipblocks...Query "ALTER TABLE ipblocks ADD ipb_auto
tinyint(1) NOT NULL default '0', ADD ipb_id int(8) NOT NULL auto_increment, ADD
PRIMARY KEY (ipb_id)" failed with error code "Table 'info.ipblocks' doesn't exist".


I was installing MediaWiki when I ran into the "key length too long" error.  I
altered the create table statement to use a smaller key length and created the
table manually.  Once the table was created, I re-ran the installation script. 
I then got this error listed above.  

My guess is that the script does not check if all tables exist before altering
the table.  My guess is that the code logic should check for the existance of
every table before attempting to do any alter table statements.  

Is there a listing of a unified create table SQL with all alterations
pre-configured so that alter table statements are not needed?

Thanks againd and have a great day!

Phade.
Comment 1 Brion Vibber 2005-08-02 21:31:54 UTC
Your database was incomplete. Drop the database and do a clean reinstall.
Comment 2 Phade 2005-08-02 22:40:32 UTC
I did that, but still the installation continuously fails.  The previous error
to this one was:

Creating tables...Query "CREATE TABLE categorylinks ( cl_from int(8) unsigned
NOT NULL default '0', cl_to varchar(255) binary NOT NULL default '', cl_sortkey
varchar(255) binary NOT NULL default '', cl_timestamp timestamp NOT NULL, UNIQUE
KEY cl_from(cl_from,cl_to), KEY cl_sortkey(cl_to,cl_sortkey(128)), KEY
cl_timestamp(cl_to,cl_timestamp) )" failed with error code "Specified key was
too long; max key length is 1000 bytes".

The simple answer I came up with to fix that error was to change the key
definition and create the table manually.  I tried KEY
cl_sortkey(cl_to(205),cl_sortkey(128)) and KEY cl_sortkey(cl_to,cl_sortkey(78)),
both of which seemed to create a valid table.

After creating the table, I re-ran the installation script hoping that it would
continue where it left off.  That is when I got the error as reported above.

Oddly, if I drop all tables, manually create the troublesome categorylinks
table, and then try to run the install script, the "Specified key was too long;
max key length is 1000 bytes" error appears instead of an expected "table
already exists" error.

Should the installer instead check for the existence of all tables, not just one
or two tables?  A check of 'table exists' and 'table is empty' would be a good
indication that the installation is a restart and to continue where a logical
'this is where I left off' point would be.  Should the installer check if UTF8
is on and adjust key lengths accordingly?  Is there an available SQL script to
manually create the tables so that there is no need for the alter table updates?
   Is there some other way to do a manual installation without using the install
script?

Thanks again for your help and have a great day!

Phade.
Comment 3 Brion Vibber 2005-08-03 07:16:41 UTC
Drop the database and install 1.5beta4, which has table definitions compatible with your MySQL configuration.
Comment 4 Phade 2005-08-03 13:48:53 UTC
Is 1.5b4 stable enough to use in a production environment?  Is there an ETA on
the official 1.5 release?

I was eventually able to get 1.4.7 installed, but I had to modify the installer
code in the tables.sql file.  Is it detremental to site performance to use
cl_sortkey(cl_to(205),cl_sortkey(128)) in the categorylinks table?

Thanks again and have a great day!

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


Navigation
Links