Bug #105013 | Odbc parameter not properly replaced when put into JOIN/VALUES statement | ||
---|---|---|---|
Submitted: | 22 Sep 2021 20:51 | Modified: | 30 Aug 2022 13:26 |
Reporter: | Andreas Lennartz | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | Connector / ODBC | Severity: | S2 (Serious) |
Version: | 8.0.26 | OS: | Windows (Windows 10 latest) |
Assigned to: | CPU Architecture: | x86 (Intel) | |
Tags: | regression |
[22 Sep 2021 20:51]
Andreas Lennartz
[22 Sep 2021 20:52]
Andreas Lennartz
Source code
Attachment: Program.cs (text/plain), 2.15 KiB.
[27 Sep 2021 13:10]
MySQL Verification Team
Hello Andreas Lennartz, Thank you for the bug report. Verified as described. Regards, Ashwini Patil
[30 Aug 2022 11:36]
Bogdan Degtyariov
Posted by developer: The bug in the server is fixed. Adding a test case to ODBC unit tests.
[30 Aug 2022 13:13]
Bogdan Degtyariov
Posted by developer: Added the Unit test. To pass the test it needs to be executed against MySQL Server 8.0.31 or newer because this version contains the fix for the base server bug.
[30 Aug 2022 13:26]
Andreas Lennartz
Thanks a lot for fixing this! Once 8.0.31 is released, I will adjust the workaround in my code and double check if the issue is solved. Thanks!
[23 Sep 2022 19:32]
Philip Olson
Posted by developer: Fixed as of the upcoming MySQL Connector/ODBC 8.0.31 release, and here's the proposed changelog entry from the documentation team: Added a test case for a Server bug that was fixed in MySQL Server 8.0.31; its release note is as follows: A prepared statement with parameters could fail to update a row, but the same statement with the same data did update the row when issued as a query. The fix for the problem is to assign a default data type to the parameters, although this can be inefficient because there is no context available for data type propagation and a character string type is given implicitly. In this case, the best practice is to wrap such parameter declarations in CAST clauses that supply the desired data types. Thank you for the bug report.