Thanks Sergie! This is very useful information.

-Rajesh

On Sun, Jan 14, 2024 at 4:28 PM Sergei Golubchik <serg@mariadb.org> wrote:
Hi, Rajesh,

On Jan 14, Rajesh Jose via discuss wrote:
> Hello everyone,
>
> In our WildFly based application, we are using mariadb-10.5.8 with
> mysql-connector as the driver. From the compatibility matrix, it
> appears that mariadb-10.2 and later are compatible with mysql-5.7
>
> ORM we use is hibernate-6.2 and the documentation says MySQL-5.7 or
> higher and MariaDB-10.3 or higher are supported with out-of-box
> dialects. . So the mariadb we use should be compliant to hibernate-6
> if we go by mariadb version or corresponding mysql version.
>
> However, when we start our app, we get a WARNING message  -
> "HHH000511: The 5.5.0 version for [org.hibernate.dialect.MySQLDialect]
> is no longer supported"
>
> When we look at the connection meta-data returned from DB, it returns
> "MySQL" as the product-name and  "5.5.5-10.5.8-MariaDB" as the product
> version. That seems to be the reason, hibernate is complaining. But if
> we connect with the mariadb-driver, it return "MariaDB" as the product
> name and "10.5.8-MariaDB" as the version.
>
>    - What does the 5.5.0 prefix signify in the version? Is it the
>    compatible MySQL version? If so, why its not 5.7 as it appears from
>    documentation that versions above mariadb-10.2 are compatible with
>    mysql-5.7?

This prefix was added in MariaDB 10.0 - at that time MySQL replication
slave detected the master version by looking at the first character in
the version string. So 10.0 was detected as some imaginary "MySQL 1.x",
which replication code doesn't support. MariaDB started sending this
prefix to workaround MySQL bug, to keep MariaDB->MySQL replication
working.

Native MariaDB connectors know about this prefix and remove it
automatically, but MySQL connectors, naturally, don't.

Now MySQL replication checks the version correctly and we've recently
removed this workaround from MariaDB server.

So, you can use a newer MariaDB version, you can use a native MariaDB
connector, or - this is the easiest - you can fake any version you want,
just add version=10.5.8-MariaDB to your my.cnf.

Regards,
Sergei
Chief Architect, MariaDB Server
and security@mariadb.org