contao / installation-bundle

[READ-ONLY] Contao Installation Bundle
GNU Lesser General Public License v3.0
8 stars 9 forks source link

Installation with MariaDB>10.3.1 not possible #87

Closed agoat closed 6 years ago

agoat commented 6 years ago

The variable innodb_large_prefix is deprecated since MariaDB 10.2 and is now removed in version 10.3.1.

When trying to install contao with a MariaDB 10.3.1+ server the install tool is complaining to set the innodb_large_prefix variable which is not available anymore.

When changing the corresponding lines in the InstallTool.php to something like this:

        if ('InnoDB' === $options['engine'] && 0 === strncmp($options['collate'], 'utf8mb4', 7) && version_compare($version, '10.3.1', '<')) {
            $row = $this->connection
                ->query("SHOW VARIABLES LIKE 'innodb_large_prefix'")
                ->fetch(\PDO::FETCH_OBJ)
            ;

The installation process can then continue, but will try to update all table columns again and again..

mariadb103-problem

After changing also the corresponding lines in DCASchemaProvider.php in the core-bundle, I was able to login and at the first glance everything was working.

m-vo commented 6 years ago

btw Contao/doctrine does not even support 10.2, see https://github.com/contao/installation-bundle/issues/83#issuecomment-355745013

agoat commented 6 years ago

Looks like contao resp. symfony (using Doctrine) has general problems with MariaDB ..

aschempp commented 6 years ago

The variable innodb_large_prefix is deprecated since MariaDB 10.2 and is now removed in version 10.3.1.

What is the reason for them removing it? Is it enabled by default? Can you point to a page where you found that information?

leofeyer commented 6 years ago

The information is correct. The whole point of deprecating was being able to remove it. 😄

innodb_large_prefix is deprecated and will be removed in a future release.

@agoat What does SHOW VARIABLES LIKE 'innodb_large_prefix' return on MariaDB 10.3.1? Does it throw an error?

agoat commented 6 years ago

What does SHOW VARIABLES LIKE 'innodb_large_prefix' return on MariaDB 10.3.1? Does it throw an error?

MariaDB returns an empty result (Tested with phpMyAdmin on a MariaDB 10.3.5 server).

But the result of

            $row = $this->connection
                ->query("SHOW VARIABLES LIKE 'innodb_large_prefix'")
                ->fetch(\PDO::FETCH_OBJ)
            ;

is false.

agoat commented 6 years ago

MariaDB 10.3.1+ and MySQL 5.8?+ always use 3072 bytes.

leofeyer commented 6 years ago

So basically:

leofeyer commented 6 years ago

Fixed in contao/core-bundle@e5b39f7078f955a6387529d46bd67ecc724736bf.

agoat commented 6 years ago

The InstallTool.php is checking the innodb_large_prefix variable and currently prevents installation with MariaDB 10.3.1+.

But the check for innodb_large_prefix is removed in the 4.5 branch (https://github.com/contao/installation-bundle/commit/c829c203ac266cb78aafaf12dcf5f4a87e46ab54). Will this be included in the next release?

leofeyer commented 6 years ago

Yes.