Project

General

Profile

Actions

Bug #25067

closed

Add compatibility with MySQL 5.5: Replace "TYPE" with "ENGINE"

Added by Christian Hernmarck almost 14 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-02-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Problem:
When using MySQL 5.5 or newer you cannot install the default tables in the install tool. Trying to create them the install tool uses the "type" table option to specify the table storage engine. This option is no longer supported in MySQL 5.5.

Error message:

 "Removed Features:
 The TYPE table option to specify the storage engine for CREATE TABLE or  ALTER TABLE (use ENGINE)." 

Fix:
Change the sqlparser (class.t3lib_sqlparser.php): Do not use "TYPE", but "ENGINE".
line 1823:
// Make query: $query = 'CREATE TABLE ' . $components['TABLE'] . ' ( ' . implode(', ', $fieldsKeys) . ' )' . ($components['tableType'] ? ' TYPE=' . $components['tableType'] : '');

(issue imported from #M17629)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #50466: MySQL: Use ENGINE instead of deprecated TYPE for storage-engineClosedStefan Neufeind2013-07-26

Actions
Actions #1

Updated by Chris topher almost 14 years ago

Hi Christian,

I have recently tried this with the Introduction Package and creating the new database tables there worked.

BUT: In MySQL 5.5 the tables are by default created as InnoDB. In many cases we decided to use MyISAM. We should discuss, if we should (silently) let that change happen or if we should define the table engine somehow explicitly.

Actions #2

Updated by Christian Hernmarck almost 14 years ago

Well - to be exact:
some tables were created - the ones without engine definition... - but obviously they were all created as innodb (as you stated right).

For me this are two "problems":
- default storage engine
- keyword to define storage engine

of course its possible to deal both in one step. It would make sense to add a "ENGINE = MyISAM" where no ENGINE is given....

Actions #3

Updated by Chris topher almost 14 years ago

I don't know if we should go on using MyISAM. Maybe they improved InnoDB so that it might make sense to change? I don't know...
Can you open a thread concerning that question in the news groups? Best in the dev list.
Guys like Masi, Dmitry or Christian Kuhn should know what to do. :-)

Actions #4

Updated by Christian Hernmarck over 13 years ago

It seems to work with the 1-2-3 mode of the install tool (maybe it's another function since all tables are created without a compare before)...

Actions #5

Updated by Thomas Deinhamer over 12 years ago

  • Target version changed from 0 to 4.5.17

Had the same problem trying to install 4.5 LTS on Windows with MySQL 5.5.

It seems the syntax "TYPE=InnoDB" has been removed in favor of the
new syntax "ENGINE=InnoDB" in MySQL version 5.5.

The t3lib_sqlparser still rewrites those queries
to "TYPE=InnoDB" and thus the query will fail.

The new code on line 1827 should be:

            )' . ($components['tableType'] ? ' ENGINE=' . $components['tableType'] : '');

Probably it should be checked for the proper MySQL version,
I'm not sure if older versions properly support "ENGINE=".

Actions #6

Updated by Navi about 12 years ago

  • Target version changed from 4.5.17 to 4.5.20

Bug still exists in 4.5.19.

Happens when trying to create the caching framework tables via DB Compare in install tool!

Actions #7

Updated by Thomas Deinhamer almost 12 years ago

  • Target version changed from 4.5.20 to 4.5.23

Still exists in 6.0.1 when trying to use the database analyzer 'compare' function to install the tables.
In 6.0.1 the mentioned line is line 1649 in the file /typo3/sysext/core/Classes/Database/SqlParser.php.
Changing 'TYPE=' to 'ENGINE=' helped.

Actions #8

Updated by Christian Fries about 11 years ago

Still exists in 6.1.3. The trick Thomas Deinhamer mentioned works.

Actions #9

Updated by Chris topher about 11 years ago

  • Subject changed from creating the default tables (Install->DB Analyser->Compare) fails with MySQL 5.5 to Add compatibility with MySQL 5.5: Replace "TYPE" with "ENGINE"
  • Is Regression set to No
Actions #10

Updated by Alexander Opitz about 11 years ago

  • Status changed from New to Closed
  • Target version deleted (4.5.23)

This issue is fixed with #50466 and released today in TYPO3 4.5.30, 4.7.15, 6.0.10 and 6.1.5

Actions

Also available in: Atom PDF