-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Bug with server_version for MariaDB >10.2.7 #2985
Comments
@tristanbes could you please send us a failing test case that reproduces that behaviour? It would help us a lot to identify and fix the issue you're describing. |
ping @Kocal |
Can this be isolated without Symfony? We have a test suite here...
Marco Pivetta
http://twitter.com/Ocramius
http://ocramius.github.com/
…On Mon, Jan 22, 2018 at 6:17 PM, Hugo Alliaume ***@***.***> wrote:
Hey!
I re-used the testing project made here
<#2825 (comment)>, in 3
versions:
1.
With server_version: '10.2.12': https://travis-ci.org/Kocal/
symfony-project-doctrine-migrations-and-mariadb-issues/builds/331910212
<https://travis-ci.org/Kocal/symfony-project-doctrine-migrations-and-mariadb-issues/builds/331910212>
2.
With server_version: 10.2.12 (no quotes): https://travis-ci.org/Kocal/
symfony-project-doctrine-migrations-and-mariadb-issues/builds/331910691
<https://travis-ci.org/Kocal/symfony-project-doctrine-migrations-and-mariadb-issues/builds/331910691>
3.
Without server_version (commented): https://travis-ci.org/Kocal/
symfony-project-doctrine-migrations-and-mariadb-issues/builds/331910672
<https://travis-ci.org/Kocal/symfony-project-doctrine-migrations-and-mariadb-issues/builds/331910672>
4.
and 3. are failing, but 2. is working
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2985 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAJakNjpoTJyNChT0g7GprHfeby6XkxCks5tNMK-gaJpZM4Rmfaa>
.
|
Hey, I isolated the project from Symfony and this is what I found:
EDIT: I forgotten to use EDIT 2: I renamed |
@Kocal you didn't require |
Oh, I forgotten it again ... thx 👍 |
Still an issue with doctrine/dbal master. Setting server_version to any version returns update bug back |
Inside or oustide Symfony context? |
Inside Symfony context with bitnami/mariadb:10.2.12-r0 image. Commenting out version helps, but this is not something we can do (as doctrine tries to connect to db on cache:clear) |
@Kocal BTW, it seems you are using "server_version" parameter in your test, but isn't the correct naming serverVersion? Doctrine bundle in symfony translates server_version to serverVersion. |
Oh, you are right, I wasn't aware about this. |
Updated, now it's when I don't specify |
which is the exact problem we have in our Symfony application, so you just reproduced the bug we've been experiencing inside our Symfony app 👍 |
Hello, we also have the same problem with mariadb 10.2.8 and typo3 installations. I already read #2825 but i don't know how to patch my typo3 installation to get it to work... please help me out... |
This still doesn't have an isolated test case - anything to be done here, or can I close it as dupe of #2825? @ciscospirit you will need to wait for a release. |
@Ocramius thanks for your fast reply... is there no manual fix for this? like patching some files until a official fix will be released? otherwise i can just downgrade to mariadb 10.1 |
@Ocramius how is this a dupe of #2825 ? It's not a duplicate of it. Right now in all our Symfony application we need to remove all @Kocal spent some time isolating, testing , and reproducing inside a Symfony application. If it's not enough to qualify a bug, then ok, but closing the issue is not ok :( |
Also, the test made on this very same comment were made outside Symfony like you asked What's missing when you say "isolated test case" ? |
What we need is something to be added in the DBAL test suite. |
Can someone help me to add this failing test please ? We need this issue fixed for the |
@tristanbes this bit: y and this is what I found:
Can we add testing for it in https://github.com/doctrine/dbal/blob/master/tests/Doctrine/Tests/DBAL/DriverManagerTest.php maybe? Or maybe Specifically, what are the driver instances (class name) and platforms instances (class names) with the permutations you worked with above? |
They broke compat all over the place in a minor - can't do much about that. |
Just locally inspected the repository mentioned above. The config file is parsed in |
Following your logic @Majkl578, if there is a bug in the upper layer, wouldn't it mean that it should break when specifiying @Ocramius I don't understand very well your question:
The only difference on the projects you linked is specifying the |
Do a |
Thanks for the clarification. Well, when giving any values to
|
As pointed out by @Majkl578,
Putting |
This small change fixes 2 things: 1/ Incorrect use of `serverVersion` for MariaDB, which *must* be prefixed with `mariadb-`, see: doctrine/dbal#3083 && symfony/symfony-docs#9547 (and doctrine/dbal#2985 (comment) for the discussion) 2/ `doctrine/dbal` now supports `MariaDB >= 10.2.7`. I added the `.12` as a minor version, but we don't need to update it when platform.sh will use .13 or .14 etc.... as long as it's superior as `10.2.7` (see: https://github.com/doctrine/dbal/blob/f76bf5ef631cec551a86c2291fc749534febebf1/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php#L136)
…iaDB (tristanbes) This PR was squashed before being merged into the 2.7 branch (closes #9547). Discussion ---------- Add a note about correct cfg value server_version for MariaDB Because when using a MariaDB database, you should prefix the `server_version` with `mariadb-`otherwise doctrine/dbal is not able to recognize it and use `MySQL57Platform` which results in: - possible bugs - endless schema diff generation Because this feature/bug is not documented, it is time to do it properly 📦 👍 * Discussion on doctrine/dbal#2985 (comment) * Also, why it should be prefixed when using `MariaDB`: https://github.com/doctrine/dbal/blob/f76bf5ef631cec551a86c2291fc749534febebf1/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php#L135 Commits ------- e6a9c1d Add a note about correct cfg value server_version for MariaDB
For me on doctrine v2.6.1 (with Symfony) we need a |
well it doesn't seem to make a difference since the condition is So as soon as mariadb is detected, it should be ok ? |
When I use it with
Thanks |
and are you sure you are using What does tell you |
@tristanbes, no I'm using 2.6.1 of doctrine/orm and 2.6.3 of doctrine/dbal. I said I was on 2.6 originally. Does this change from 2.6 to 2.7?
Thanks |
Yes, MariaDB is only supported with dbal >= 2.7 |
I have problems with endless migration files when dbal is not detecting nulls. The problem is with doctrine/dbal 2.9.2 and mariadb 1.3.x and 1.4.x. Tried everything |
I'm too still (for years now) having the same issue. current versions |
@w3sami we make a deep analysis and we were having problems with "default" values sintax in our annotations, make sure to double check that! |
Hi, thanks for the reply. I'm not using any default values. Probles are in every field, even in relations eg. |
Exactly, we had problems with default '0' vs 0 in booleans for example, and we focus to explicity add defaults values until fix the issue. It's a workaround, but it better than having buggy migrations outputs. |
yes, sadly it does not help for the join column as the option is to add nullable=flase, which yields the same results, as it is the default already. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hello,
I think there is a problem when providing the
server_version
parameter.when having a
server_version
set to10.2.12
, the bug discussed here is still present. (it generates endless migrations diff)When removing the
server_version
parameter, it works as excepted.We also tried
Could it be that the excepted version is something else than 10.2.x ?
The text was updated successfully, but these errors were encountered: