contao/core — Issue #3854: The database installer class does not take into account database meta information
Author: xchs
Created: 2012-01-26 00:43:56+00:00
State: open

Regarding the current 3.0 branch I noticed the following issue in the Contao Install Tool: It seems like the [DbInstaller class](https://github.com/contao/core/blob/3.0.x/system/library/Contao/DbInstaller.php) does not yet take into account the *meta information* (i.e. database storage engine and character set). The relevant SQL information is contained in the respective array (SQL statements extracted from DCA files):

```php
$this->arrMeta = array
(
'engine' => 'MyISAM',
'charset' => 'utf8',
);
```
Anyway, this could lead to problems with MySQL database management systems with default storage engines that differ from `MyISAM`. For instance, my local database server runs with *default* storage engine `InnoDB`. That said, I get the following exception if the `CREATE` statement does not provide the required engine information

```
Fatal error: Uncaught exception Exception with message Query error: The used table type doesn't support FULLTEXT indexes (CREATE TABLE `tl_search` ( `id` int(10) unsigned NOT NULL auto_increment, `pid` int(10) unsigned NOT NULL default '0', `tstamp` int(10) unsigned NOT NULL default '0', `title` varchar(255) NOT NULL default '', `url` varchar(255) NOT NULL default '', `text` mediumtext NULL, `filesize` double unsigned NOT NULL default '0', `checksum` varchar(32) NOT NULL default '', `protected` char(1) NOT NULL default '', `groups` blob NULL, `language` varchar(2) NOT NULL default '', PRIMARY KEY (`id`), KEY `pid` (`pid`), KEY `url` (`url`), FULLTEXT KEY `text` (`text`) );) thrown in system/library/Contao/Database/Statement.php on line 315

#0 system/library/Contao/Database.php(181): Contao/Database_Statement->query('CREATE TABLE `t...')
#1 contao/install.php(763): Contao/Database->query('CREATE TABLE `t...')
#2 contao/install.php(960): InstallTool->run()
#3 {main}
```

as long as the current default storage engine does not (yet) support `FULLTEXT` indexes.