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

Incorrect Azure MySQL version detected #4032

Closed
eddedre opened this issue May 27, 2020 · 4 comments
Closed

Incorrect Azure MySQL version detected #4032

eddedre opened this issue May 27, 2020 · 4 comments

Comments

@eddedre
Copy link

eddedre commented May 27, 2020

Bug Report

Q A
BC Break yes
Version 2.10.2

Summary

I get this error when using a Azure MySQL database 5.7.x

"Unknown database type json requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it."

Current behaviour

It appears that the package is not reporting the right version

How to reproduce

docker@api:/var/www/html$ php artisan tinker
Psy Shell v0.10.4 (PHP 7.2.30-1+ubuntu18.04.1+deb.sury.org+1 — cli) by Justin Hileman

DB::connection()->getPdo();
=> Doctrine\DBAL\Driver\PDOConnection {#3298
inTransaction: false,
attributes: {
CASE: NATURAL,
ERRMODE: EXCEPTION,
AUTOCOMMIT: 1,
PERSISTENT: false,
DRIVER_NAME: "mysql",
SERVER_INFO: "Uptime: 605054 Threads: 9 Questions: 1117139 Slow queries: 0 Opens: 580 Flush tables: 1 Open tables: 103 Queries per second avg: 1.846",
ORACLE_NULLS: NATURAL,
CLIENT_VERSION: "mysqlnd 5.0.12-dev - 20150407 - $Id: 3591daad22de08524295e1bd073aceeff11e6579 $",
SERVER_VERSION: "5.6.42.0",
STATEMENT_CLASS: [
"Doctrine\DBAL\Driver\PDOStatement",
[],
],
EMULATE_PREPARES: 0,
CONNECTION_STATUS: "************.database.azure.com via TCP/IP",
DEFAULT_FETCH_MODE: BOTH,
},
}

Expected behaviour

It should return 5.7.29 as report when I manually run SELECT @@Version

image

@SenseException
Copy link
Member

Have you set a server-version in the DBAL configuration?

@morozov
Copy link
Member

morozov commented Jun 13, 2020

Have you set a server-version in the DBAL configuration?

I believe this is irrelevant. The bug is about detecting the version. Azure MySQL is not currently supported. Although, setting the version manually may work as a workaround.

I get this error when using a Azure MySQL database 5.7.x
SERVER_VERSION: "5.6.42.0"

This looks coming from PDO, DBAL has nothing to do with that. In the recent past (#3595) we dropped the support for Azure Federations because it's a commercial product that cannot be used by the library maintainers. Unless there's a way to continuously test with this platform, it's not going to be supported.

@SenseException
Copy link
Member

Having a workaround was my intention in case no version was set for this use case.

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants