Page MenuHomePhabricator

1.6 doesn't work with MySQL 4.0
Closed, ResolvedPublic

Description

Author: wiki.vincent

Description:
http://www.mediawiki.org/wiki/Release_notes/1.6 reports that 1.6 works fine
since MySQL 4.0, but in fact, it works since 4.1

The bug belongs to MySQL but could be removed changing ENGINE->TYPE at the
creation of the tables.

ENGINE=InnoDB -> Type=InnoDB

Here is the trace.

  • PHP 4.4.2 installed
  • Warning: PHP's register_globals option is enabled. Disable it if you can. MediaWiki will work, but your server is more exposed to PHP-based security

vulnerabilities.

  • PHP server API is cgi; using ugly URLs (index.php?title=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.
  • Found ImageMagick: /usr/local/bin/convert; image thumbnailing will be

enabled if you enable uploads.

  • Found GD graphics library built-in.
  • Installation directory: /home.1/a/m/p/amplyd/www/wikiblog
  • Script URI path: /~amplyd/wikiblog
  • Environment checked. You can install MediaWiki.

    Generating configuration file...
  • Database type: mysql
  • PHP is linked with old MySQL client libraries. If you are using a MySQL

4.1 server and have problems connecting to the database, see
http://dev.mysql.com/doc/mysql/en/old-client.html for help.

  • Attempting to connect to database server as amplyd1...success.
  • Connected to 4.0.17-standard-log
  • Database amplyd1 exists
  • Creating tables... using MySQL 4 table defs...Query "CREATE TABLE

mw_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) ) ENGINE=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 'ENGINE=InnoDB' at line 18 (sql)".


Version: 1.6.x
Severity: normal

Details

Reference
bz5508

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:10 PM
bzimport set Reference to bz5508.
bzimport added a subscriber: Unknown Object (MLST).

ENGINE=InnoDB works fine with 4.0.24.

Use 4.0.19 or later or get current REL1_6 branch from SVN or wait for
1.6.3 or replace the ENGINE= with TYPE= manually.

robchur wrote:

Fixed in SVN HEAD and backported to REL1_6, r13563. Will be fixed in 1.6.3.

nugundam wrote:

Changing ENGINE->TYPE breaks updating to 1.6.3 from 1.5.8 using MySQL 5.1.7 when
creating the new 1.6.x tables.

example:
Creating templatelinks table...
Query "CREATE TABLE tt_templatelinks (
tl_from int(8) unsigned NOT NULL default '0',
tl_namespace int NOT NULL default '0',
tl_title varchar(255) binary NOT NULL default '',
UNIQUE KEY tl_from(tl_from,tl_namespace,tl_title),
KEY (tl_namespace,tl_title)
) 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
'TYPE=InnoDB' at line 7 (localhost)".

The solution is to manually create these tables with TYPE->ENGINE instead.

See also bug 6085 :
TYPE= will generate fatal error in MySQL 5.2