Bug #111944 | Issue with ADO transactions when using MySQL Connector ODBC 8.0.33 32-bit | ||
---|---|---|---|
Submitted: | 2 Aug 13:14 | Modified: | 14 Nov 8:05 |
Reporter: | Jan Stepan | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | Connector / ODBC | Severity: | S2 (Serious) |
Version: | 8.0.33 | OS: | Windows |
Assigned to: | Bogdan Degtyariov | CPU Architecture: | x86 |
Tags: | ADO, Delphi, transaction |
[2 Aug 13:14]
Jan Stepan
[2 Aug 14:06]
MySQL Verification Team
Hi, Please wait until the C/ODBC expert takes a look at the problem.
[3 Aug 12:51]
MySQL Verification Team
Hi Mr. Stepan, We have noticed that you are using Delphi. This is a commercial product that we use and we can not repeat your test case, unless we purchase or somehow obtain a copy of Delphi. If we manage to achieve that, you will hear from us again.
[3 Aug 14:13]
Jan Stepan
Thank you. I plan to report the issue to Embarcadero support portal too, as soon as I get access. Note: Regarding the description of this issue, there is a typo: *Proceed with any select command (using the TADOConnection.Open) and then close the query (using TADOConnection.Close). Do not free the TADOQuery instance. should be *Proceed with any select command (using the TADOQuery.Open) and then close the query (using TADOQuery.Close). Do not free the TADOQuery instance.
[7 Aug 5:27]
Jan Stepan
I received today a reply from Embarcadero Support with some details they discovered regarding the issue: " I see that there is a difference in behaviour between 8.0.32 and 8.0.33. In fact, if the two queries are select statements, it is not necessary to to close the first query before opening the second one. My guess is that the older driver implements mysql_stmt_store_result() https://dev.mysql.com/doc/c-api/8.0/en/mysql-stmt-store-result.html This forces all rows to be fetched back to the client so that another query can be executed. "
[7 Aug 5:39]
Bogdan Degtyariov
Hi Jan, Both drivers 8.0.32 and 8.0.33 work with mysql_stmt_store_result(). Please make sure this functionality is not disabled via the connection string (NO_CACHE=1, which I don't see in your example code, but still can be present in the real live app). Also, you need to make sure if you are using a DSN (which is also not a case in the example code) the checkbox is not checked in Details >> Cursors/Results >> [ ] Don't cache results of forward-only cursors. So far, I saw no evidence of this happening. Perhaps you could create an ODBC trace in ODBC Data Administrator via Tracing tab. The tracing needs to be activated before you start your test application. Please upload the trace for us to review. Thanks.
[9 Aug 6:11]
Jan Stepan
With help of Embarcadero Support, I got some additional details about the issue with the ODBC driver. I will upload SQL ODBC logs comparing the usage of old and new version of the driver. Here is a note about the logs I received: " I have attached the traces that I made from my test case with both driver versions. Everything looks the same up until the first select statement is closed. I see with the 8.00.33 driver that a SQLFreeStmt is issued (line 4834 of the trace file), which should free all resources from that statement and therefore allow the second one to be opened. " Note: Embarcadero offers a trial version of Delphi for the testing purposes. https://www.embarcadero.com/products/delphi/start-for-free
[9 Aug 6:12]
Jan Stepan
ODBC SQL trace log of the 8.0.32 version of the driver.
Attachment: 8032_2.log (application/octet-stream, text), 692.00 KiB.
[9 Aug 6:12]
Jan Stepan
ODBC SQL trace log of the 8.0.33 version of the driver.
Attachment: 8033_3.log (application/octet-stream, text), 162.88 KiB.
[14 Nov 4:50]
Willian Coutinho Willian
Hello, any update about this issue?
[14 Nov 8:05]
Jan Stepan
Hello, thanks for notification about the issue. However, there is not much what can be done from my side. I was able to reproduce the issue even with the latest 8.0.35 Connector version. As I noted in previous comments, Embarcadero did not seem to find any issue in their own ODBC handling code. They provided me witch ODBC logs, which I attached to this issue some time ago as the developers requested.
[14 Nov 11:00]
Willian Coutinho Willian
Unfortunately, I had to roll back the Driver to version 8.0.31. Starting from version 8.0.33, including 8.2.0, the following errors appear: "Transaction cannot have multiple recordsets with this cursor type. Change the cursor type, commit the transaction, or close one of the recordsets." or, in some cases: "Transaction cannot start because more than one ODBC connection is in use"
[30 Nov 15:43]
fred saury
Same environment same problem here. Any advice to avoid this blocking issue ?