Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
2.0.13
-
None
-
Windows 64-bit
Description
Looks like SQLDisconnect() handling with MariaDB ODBC driver is not cleaning up the information properly. Either that or SQLDriverConnect() should properly set the new value from the connection string. In my case, call to SQLDriverConnect() after SQLDisconnect() complained about database name of the previous connection!
Please see the attached standalone program along with the output. If I use MySQL ODBC driver, then I don't see the same issue. Standalone program uses both MariaDB and MySQL ODBC drivers.
The connector would try to set database from previous connection as a default database for new connection. If there was no such database at the server, connecting would fail. That happened because connector copied database name form connection string to the structure field where SQL_ATTR_CURRENT_CATALOG attribute is stored, if it wasn't set.