Release Notes for MariaDB Connector/ODBC 3.2.0
This page is part of MariaDB's Documentation.
The parent of this page is: Release Notes for MariaDB Connector/ODBC 3.2
Topics on this page:
Overview
MariaDB Connector/ODBC is a standard ODBC driver for building cross-platform applications on top of MariaDB database products. It is compliant with ODBC 3.5. It is written in C and uses MariaDB Connector/C.
MariaDB Connector/ODBC 3.2.0 was released on 2023-04-21. This release is of Alpha maturity, and should not be used with production workloads.
Notable Changes
The
SQLExecDirect
ODBC API function uses the text protocol and client-side prepared statements (CSPS) by default. (ODBC-222)In previous releases, when a statement is executed with the
SQLExecDirect
ODBC API function and the statement requires parameters or returns a result-set, Connector/ODBC always uses the binary protocol and server-side prepared statements (SSPS).Starting with this release, when a statement is executed with the
SQLExecDirect
ODBC API function, Connector/ODBC uses the text protocol and client-side prepared statements (CSPS), except for queries where the binary protocol is necessary, such as when executing the to call a stored procedure.
The
PREPONCLIENT
connection parameter can be enabled to make theSQLPrepare
ODBC API function use the text protocol and client-side prepared statements (CSPS). (ODBC-222)In previous releases, when a statement is executed the
SQLPrepare
ODBC API function, Connector/ODBC always uses the binary protocol and server-side prepared statements (SSPS).Starting with this release, when a statement is executed with the
SQLPrepare
ODBC API function, Connector/ODBC still uses the binary protocol and server-side prepared statements (SSPS) by default, but it uses the text protocol and client-side prepared statements (CSPS) when thePREPONCLIENT
connection parameter is enabled. When thePREPONCLIENT
connection parameter is enabled, Connector/ODBC reverts to the binary protocol and server-side prepared statements (SSPS) when necessary, such as when the result-set metadata is queried before theSQLExecute
API function is called. When thePREPONCLIENT
connection parameter is not enabled, Connector/ODBC automatically switches to the text protocol and client-side prepared statements (CSPS) when a multi-statement query is executed.For example, to enable the
PREPONCLIENT
connection parameter in a unixODBC data source configuration file:# Data Source for unixODBC [test-mdb] Description = MariaDB test environment Driver = MariaDB ODBC 3.2 Driver Trace = Yes TraceFile = /tmp/trace.log SERVER = localhost SOCKET = /var/run/mysqld/mysqld.sock USER = db_user PASSWORD = db_user_password DATABASE = test PREPONCLIENT = 1
When the text protocol and client-side prepared statements (CSPS) are enabled and a statement is executed on arrays of parameters, Connector/ODBC can use batching over the text protocol. (ODBC-86)
In previous releases, when statements are executed on arrays of parameters, Connector/ODBC uses batching over the binary protocol.
Starting with this release, when the text protocol and client-side prepared statements (CSPS) are enabled and statements are executed on arrays of parameters, Connector/ODBC generates a batch of statements based on the values in the arrays and sends the batch via the text protocol.
Connector/ODBC uses forward-only cursors by default to be more compliant with the ODBC specification. (ODBC-290)
In previous releases, Connector/ODBC creates
SQL_CURSOR_STATIC
cursors by default.Starting with this release, Connector/ODBC creates
SQL_CURSOR_FORWARD_ONLY
cursors by default.
When the
SQLTables
ODBC API function is called and theCatalogName
argument isNULL
, Connector/ODBC's behavior is more consistent with other ODBC drivers. (ODBC-298)In previous releases, the default value of the
NULLISCURRENT
connection parameter is0
, so when theCatalogName
argument isNULL
, Connector/ODBC returns tables from all databases.Starting with this release, the default value of the
NULLISCURRENT
connection parameter is1
, so when theCatalogName
argument isNULL
, Connector/ODBC returns tables from the currently selected database.
When (ODBC-388)
is enabled, Connector/ODBC supports connection attributes that can be queried via the and tables.Starting with this release, the
ATTR
connection parameter can be used to set connection attributes in the format:ATTR={<attrname1>=<attrvalue1>[,<attrname2=attrvalue2,...]}
For example, to set the
ATTR
connection parameter in a unixODBC data source configuration file:# Data Source for unixODBC [test-mdb] Description = MariaDB test environment Driver = MariaDB ODBC 3.2 Driver Trace = Yes TraceFile = /tmp/trace.log SERVER = localhost SOCKET = /var/run/mysqld/mysqld.sock USER = db_user PASSWORD = db_user_password DATABASE = test ATTR = {internal_app_name="Internal Web Portal",internal_app_version="1.2.0",internal_app_node="intweb2.example.org"}