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 issues with MariaDB #17711

Open
erikellsinger opened this issue Aug 22, 2022 · 5 comments
Open

Installation issues with MariaDB #17711

erikellsinger opened this issue Aug 22, 2022 · 5 comments

Comments

@erikellsinger
Copy link

🐛 I'm reporting a Bug 🐛

When trying to install the latest version of Akeneo I run into several issues, first is this one:

12:00:33 WARNING   [batch] Encountered an error executing the step: Could not convert database value "2022-08-22 12:00:33.000000" to Doctrine Type datetime_immutable. Expected format: Y-m-d H:i:s

This seems to be caused by: https://github.com/akeneo/pim-community-dev/blob/master/src/Akeneo/Pim/Enrichment/Bundle/Storage/Sql/ElasticsearchProjection/GetElasticsearchProductProjection.php#L138

If I remove COALESCE it works fine.

When I fix that I run into another issue:

array, string given" ["exception" => TypeError { …},"command" => "akeneo:batch:job fixtures_product_model_csv --no-debug=1 --no-log=1 -v 1 --env=dev","message" => "array_merge(): Argument #1 must be of type array, string given"]

Which seems to be an issue with the usage of JSON_ARRAYAGG in the same file.

So the questions is, how well is MariaDB supported? I haven't tried this under MySQL but I would assume it works. We run MariaDB 10.5.

@mtournay
Copy link

I everyone
@erikellsinger it's seems to be an old doctrine issue of not supporting milliseconds
doctrine/dbal#2873

I run a mariadb 10.5 too, and i'd like to know if it's possible or to to use it !

@erikellsinger
Copy link
Author

@mtournay Did you manage to get it installed on 10.5 or did you run into the same issues?

@mtournay
Copy link

Hi there

@erikellsinger I did it !
I had to cast to datetime manually in code

file GetElasticsearchProductProjection.php
line 133
CAST(GREATEST(product.updated, IFNULL(sub_product_model.updated, 0), COALESCE(root_product_model.updated, 0)) AS DATETIME(0)) AS updated_date,

file GetElasticsearchProductModelProjection.php
line 109
CAST(GREATEST(product_model.updated, COALESCE(root_product_model.updated, 0)) as DATETIME(0)) as updated,

btw I my server ran mariadb 10.6 :
mysql Ver 15.1 Distrib 10.6.8-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

Isodude point out that it's a mariadb issue :
doctrine/dbal#2873 (comment)

BUT
according to this, it's kinda feature
https://jira.mariadb.org/browse/MDEV-4560?jql=text%20~%20%22greatest%20datetime%22

I think it's better for akeneo team to change the request

@WoutervanderLoopNL
Copy link

have the same issue here, but than on the product import, any posible fix?

@macbeth
Copy link

macbeth commented Sep 27, 2022

I can confirm this issue with mariadb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants