Project

General

Profile

Actions

Bug #22058

closed

ext_tables.sql Syntax

Added by Joachim Mathes almost 15 years ago. Updated over 14 years ago.

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

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I extended the ext_tables.sql file of my extension by one new table, which is similar to the following definition.

CREATE TABLE `foobar` (
`uid` int(11) NOT NULL auto_increment,
`pid` int(11) NOT NULL DEFAULT '0',
`tstamp` int(11) NOT NULL DEFAULT '0',
`crdate` int(11) NOT NULL DEFAULT '0',
`cruser_id` int(11) NOT NULL DEFAULT '0',
`deleted` tinyint(4) NOT NULL DEFAULT '0',
`hidden` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`uid`),
KEY `parent` (`pid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

As a matter of fact the extension manager will not create this table. The problem are two spaces between "TABLE" and "`foobar`" instead of one. Even if ext_tables.sql is not meant to be fully MySQL compatible, this is quite annoying, especially when the SQL code is created automatically as it is in my case.
The reason for this restrictive behaviour is the explode() function in line 306 in the getFieldDefinitions_fileContent() method in t3lib/class.t3lib_install.php. What about replacing it with a more compliable preg_split("/\s+/",$value)?

(issue imported from #M13423)


Files

t3lib_install.patch (511 Bytes) t3lib_install.patch Administrator Admin, 2010-02-04 15:48
Actions

Also available in: Atom PDF