Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
3.1.19
-
None
-
Windows Server
MariaDB 10.0.38 (64bit)
ODBC driver 3.1.19 (32bit)
Description
Our .NET application uses MariaDB ODBC driver to get information from target MariaDB servers - it is monitoring software that can retrieve information from different versions of MariaDB.
New version of ODBC driver 3.1.19 (32bit) is failing with following error when we try to execute simple DB command on older versions of MariaDB (e.g. 10.0.38 or 5.5.64).
System.Data.Odbc.OdbcException (0x80131937): ERROR [HY000] [ma-3.1.19][10.0.38-MariaDB]Unknown system variable 'STATEMENT'
The driver is working against the latest MariaDB version (11.2.2).
This is regression bug as it was working with ODBC driver 3.1.16.
I believe the root cause is SET STATEMENT
https://github.com/mariadb-corporation/mariadb-connector-odbc/blob/014e86b910e91dbce64ebb5ed7200316c3012949/ma_statement.c#L663
This feature is available from MariaDB 10.1.2 (https://docs.w3cub.com/mariadb/set-statement/index).
It is possible to extend following condition to check also version of target DB if SET STATEMENT command is available?
https://github.com/mariadb-corporation/mariadb-connector-odbc/blob/014e86b910e91dbce64ebb5ed7200316c3012949/ma_statement.c#L790