[CONJ-1119] MariaDB 10.3 on Azure is recognized as MySQL 5.6.47 Created: 2023-10-27  Updated: 2023-11-16  Resolved: 2023-11-16

Status: Closed
Project: MariaDB Connector/J
Component/s: metadata
Affects Version/s: 3.2.0, 3.1.4
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Lorenzo Peri Assignee: Diego Dupin
Resolution: Not a Bug Votes: 0
Labels: None

Attachments: PNG File connection_context.png     PNG File hibernate_dialect.png     Text File trace_log.txt    

 Description   

I'm using the Azure Database for MariaDB service which runs a MariaDB 10.3 instance.

The problem is that the MariaDB Connector detects the DB as MySQL 5.6.47.0
You can see in the screenshot that 'mariadDBServer' is false.

The getDatabaseProductName method will return "MySQL" instead of "MariaDB".
But maybe most importantly for me, the reported version is also 5.6.47.

Hibernate 6 will then read such metadata and emit the following warning:

The 5.6.47 version for [org.hibernate.dialect.MariaDBDialect] is no longer supported, hence certain features may not work properly. The minimum supported version is 10.3.0. Check the community dialects project for available legacy versions.

You can see in the picture that 5.6.47 is compared with 10.3 (the minimum) and found to be lower:

The fix would be MariaDB Connector recognizing the DB for what it is: MariaDB 10.3.

Tested with MariaDB Connector 3.1.4 and 3.2.0.



 Comments   
Comment by Diego Dupin [ 2023-10-27 ]

Could you send wireshark dump or set logger "org.mariadb.jdbc" to trace, something like :

      <logger name="org.mariadb.jdbc" level="trace" additivity="false">
        <appender-ref ref="CONSOLE"/>
      </logger>

depending of your logger ?

Comment by Lorenzo Peri [ 2023-11-01 ]

This is the log at trace level. Let me know if you also need the wireshark dump.

Note about sensible data: I'm not sure if the password is also logged, but I used a different temporary password just to be sure,

trace_log.txt

Comment by Diego Dupin [ 2023-11-06 ]

According to the trace you've send, this is really a mysql server => server handshake doesn't have any of mariadb capabilities flag set.

Comment by Lorenzo Peri [ 2023-11-06 ]

Thanks Diego,
it looks like the problem is on Azure side then.

I guess you can close the ticket.

Generated at Thu Feb 08 03:20:45 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.