Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation with MariaDB>10.3.1 not possible #87

Closed
agoat opened this issue Feb 28, 2018 · 10 comments
Closed

Installation with MariaDB>10.3.1 not possible #87

agoat opened this issue Feb 28, 2018 · 10 comments
Assignees
Labels
Milestone

Comments

@agoat
Copy link

agoat commented Feb 28, 2018

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
Copy link
Member

m-vo commented Feb 28, 2018

btw Contao/doctrine does not even support 10.2, see #83 (comment)

@agoat
Copy link
Author

agoat commented Feb 28, 2018

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

@aschempp
Copy link
Member

aschempp commented Mar 1, 2018

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
Copy link
Member

leofeyer commented Mar 1, 2018

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
Copy link
Author

agoat commented Mar 1, 2018

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
Copy link
Author

agoat commented Mar 1, 2018

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

@leofeyer
Copy link
Member

leofeyer commented Mar 1, 2018

So basically:

  • If false === $row: The option does no longer exist -> 3072.
  • If in_array(strtolower($row->Value), ['1', 'on']): The option is enabled -> 3072.
  • Else: The option is disabled -> 767.

@leofeyer leofeyer added the defect label Mar 1, 2018
@leofeyer leofeyer self-assigned this Mar 1, 2018
@leofeyer leofeyer added this to the 4.5.5 milestone Mar 1, 2018
@leofeyer
Copy link
Member

leofeyer commented Mar 1, 2018

Fixed in contao/core-bundle@e5b39f7.

@leofeyer leofeyer closed this as completed Mar 1, 2018
@agoat
Copy link
Author

agoat commented Mar 1, 2018

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 (c829c20). Will this be included in the next release?

@leofeyer
Copy link
Member

leofeyer commented Mar 1, 2018

Yes.

@leofeyer leofeyer modified the milestones: 4.5.5, 4.5 May 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants