[ODBC-91] Disconnected database handle cannot be used for another new connection Created: 2017-03-24 Updated: 2018-02-21 Resolved: 2018-02-20 |
|
| Status: | Closed |
| Project: | MariaDB Connector/ODBC |
| Component/s: | General |
| Affects Version/s: | 2.0.13 |
| Fix Version/s: | 3.0.4, 2.0.17 |
| Type: | Bug | Priority: | Major |
| Reporter: | Rahul Dhuvad | Assignee: | Lawrin Novitsky |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows 64-bit |
||
| Attachments: |
|
| 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. |
| Comments |
| Comment by Lawrin Novitsky [ 2018-02-20 ] |
|
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. |