Bug #111756 MySQL ODBC Connector, re-usable connection, pooling, session not working
Submitted: 14 Jul 2023 9:16 Modified: 16 Jun 2024 12:01
Reporter: Krish KM Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version:8.0.33 OS:Windows
Assigned to: Assigned Account CPU Architecture:Other (x64)
Tags: connection pooling, ODBC Connector, reusable-connection

[14 Jul 2023 9:16] Krish KM
Description:
We have a MS Access application with linked tables and pass-through queries to the MySQL server. After updating the MySQL ODBC connector to v8.0.33, we observe - a new connection is created per SQL request- as opposed to use an existing connection.

Client:
Windows x64, Office x64(v2303), Ms Access
MySQL ODBC Connector v8.0.33

Server:
MySQL Community Version: 8.0.30

Our actual problem:
we create a temporary table via a pass-t query and expect the temporary table to be visible in subsequent requests by other pass-t queries. -It will be visible if the connection is the same as temporary tables are scoped to each connection.-

>>After opening a linked table with a large data set, we observed subsequent pass-t queries create new connections per query resulting in the previously generated temporary table not being visible.

>>When all linked tables are closed, all pass-t queries go back to using the same connection again and the previously generated temporary table is visible again.

ODBC connection pooling setting in Windows didn't have any effect.

How to repeat:
1. Prepare your environment described as above.
2. Create a linked table (large data set over 10k rows that has Text fields too)
3. Create 3 pass-through queries with sql "select connection_id();"

Scenario 1 (simplified):
1. open each pass-through query one after one. You will see the connection id will be the same in all queries. (re-using an existing connection)

2. Close 2 of the pass-through queries

3. Open the linked table and leave it open

4. Open the remaining 2 pass-through query : << here connection id differs in each query>>

5. Close the linked table

6. Close any of the 2 pass-t queries and reopen << here you can observe all pass-t queries have the same connection id again

We observe each pass-t query opened "AFTER" step 3. has a new connection id.
After step 5. Pass-t queries go back to using the same connection.

This was not the case prior to the 8.0.33 version.

Suggested fix:

Opening a linked table causes subsequent pass-t queries to have a new connection per query should be fixed. All requests within a client should respect re-usable connection/pool.
[16 May 2024 12:01] MySQL Verification Team
Hello Krish,

Thank you for the bug report.
Please upgrade to latest version and report us back if issue persist even in latest version along with details. Thank you.

Regards,
Ashwini Patil
[17 Jun 2024 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".