Last modified: 2007-07-20 14:40:03 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 T8085, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 6085 - TYPE= will generate fatal error in MySQL 5.2
TYPE= will generate fatal error in MySQL 5.2
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2006-05-25 17:49 UTC by Ben
Modified: 2007-07-20 14:40 UTC (History)
0 users

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


Description Ben 2006-05-25 17:49:46 UTC

I am installing MediaWiki 1.6.6 (not yet an option in the version picklist) on
WindowsXP using Apache 2.2.2, PHP 5.2, and MySQL 5.0.21

When the wiki tries to install, I get the following:

    * PHP 5.2.0-dev installed
    * 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.
    * Neither Turck MMCache nor eAccelerator are installed, can't use object
caching functions
    * GNU diff3 not found.
    * Couldn't find GD library or ImageMagick; image thumbnailing disabled.
    * Installation directory: D:\Program Files\Apache Software
    * Script URI path: /wiki
    * Environment checked. You can install MediaWiki.
    * Warning: $wgSecretKey key is insecure, generated with mt_rand(). Consider
changing it manually.

      Generating configuration file...
    * Database type: mysql
    * Attempting to connect to database server as wikiuser...success.
    * Connected to 5.0.21-community-nt
    * Database wikidb exists
    * Creating tables... using MySQL 4 table defs...Query "CREATE TABLE `user` (
user_id int(5) unsigned NOT NULL auto_increment, user_name varchar(255) binary
NOT NULL default '', user_real_name varchar(255) binary NOT NULL default '',
user_password tinyblob NOT NULL default '', user_newpassword tinyblob NOT NULL
default '', user_email tinytext NOT NULL default '', user_options blob NOT NULL
default '', user_touched char(14) binary NOT NULL default '', user_token
char(32) binary NOT NULL default '', user_email_authenticated CHAR(14) BINARY,
user_email_token CHAR(32) BINARY, user_email_token_expires CHAR(14) BINARY,
user_registration CHAR(14) BINARY, PRIMARY KEY user_id (user_id), UNIQUE INDEX
user_name (user_name), INDEX (user_email_token) ) TYPE=InnoDB " failed with
error code "You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '' at
line 1 (localhost)". 

It appears that even though the install recognized the MySQL 5 server, it tries
to use MySQL4 command syntax.  Manually running that query through the MySQL
Queryt Browser application returned an error indicating that the
"TYPE=database_type" syntax was deprecated and should be changed to
"ENGINE=database_type".  I made that change to the command and the Query Browser
app was able to run it sucessfully.

While that change fixes the one error, perhaps this might be an indicator of a
larger problem?  The installer noticed that I was using MySQL5 but used MySQL4
syntax instead.  Is this something that I can change (or find a list of the SQL
commands run and create all the tables manually)?  Thank you!
Comment 1 Brion Vibber 2006-05-25 19:27:46 UTC
TYPE works fine with MySQL 5.0.21. It is possible you have broken 
your configuration somehow by switching it into an incompatible 
mode? Please consult your MySQL configuration file.
Comment 2 Ben 2006-05-26 19:17:37 UTC
Apparently this is related to an issue with recent versions of MySQL
( where using TYPE generates an error
instead of a warning.  My MySQL was a fresh, unmodified installation, so I doubt
it is a configuration issue.  I will find an older version of MySQL and try again.

Just to warn you though, the MySQL developers report that as of version 5.2,
TYPE will no longer be supported.  The installer for future version of MediaWiki
should probably detect MySQL versions 5+ and use ENGINE instead of TYPE to avoid
breaking the installer completely.
Comment 3 Antoine "hashar" Musso (WMF) 2006-05-26 19:28:04 UTC
Updated summary + URL to bug report.
Comment 4 Edward Z. Yang 2006-06-18 04:07:46 UTC
If this is a bug with MySQL, then perhaps this should be WONTFIX, and we open a
new bug for TYPE information. By the way, Wikimedia is still using MySQL 4.
Comment 5 Rob Church 2006-06-18 13:35:41 UTC
However, if it's the case that MySQL is changing syntax, again, then I suppose
we need to change our table definitions or our method of using them, so that we
won't break stuff for people running newer versions later on.
Comment 6 Edward Z. Yang 2006-06-18 16:47:05 UTC
I don't think this a blocker (yet), but here are links to the docs:

MySQL 5.1

TYPE is supported for backwards compatibility but is deprecated. Maybe the call
is unnecessary?
Comment 7 Dereckson 2006-08-15 17:55:24 UTC
Replace TYPE= by ENGINE= is a quick and minor change.

What's the problem updating install script ?
Comment 8 Rob Church 2006-08-15 19:06:28 UTC
(In reply to comment #7)
> Replace TYPE= by ENGINE= is a quick and minor change.

Yes, but I bet you forgot to do maintenance/archives/*.sql.

> What's the problem updating install script ?

It's not supported in MySQL 4.x, at least, and so isn't compatible with the
version most of our users are going to use.

Something like /*ENGINE*/ could be handled in Database::sourceFile(), similar to
the current handling of /*$wgDBprefix*/ et al.

Comment 9 Dereckson 2006-08-15 20:20:08 UTC
MySQL 4.0.18+ and 4.1.2+ supports it, according :

The ENGINE and TYPE  options specify the storage engine for the table. ENGINE
was added in MySQL 4.0.18 (for 4.0) and 4.1.2 (for 4.1). It is the preferred
option name as of those versions, and TYPE has become deprecated. TYPE is
supported throughout the 4.x series, but likely will be removed in the future.
Comment 10 Andrew Garrett 2006-11-07 09:51:18 UTC
Decreasing severity. Posting a support bug with a severity of BLOCKER is just
Comment 11 Rob Church 2006-11-07 12:14:43 UTC
That's what blocker means, although we're not targeting MySQL 5.2.x at present.
Comment 12 Brion Vibber 2006-11-08 14:17:37 UTC
As of r17492, using ENGINE on the experimental MySQL 4.1/5 UTF-8 schema.

Main schema still uses TYPE for compatibility with older releases of MySQL 4.0.

MySQL's continued lack of full UTF-8 support means MediaWiki may continue to default to the old schema for the forseeable 
future, or else switch to an explicit binary-friendly MySQL 5 schema. >:|
Comment 13 Brion Vibber 2007-07-20 14:40:03 UTC
The new installer code should be automatically using ENGINE where needed, so I'd consider this issue fixed.

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