Bug #106683 | Query using prepared statement return wrong result | ||
---|---|---|---|
Submitted: | 9 Mar 2022 23:31 | Modified: | 7 Apr 2022 21:25 |
Reporter: | Stephen Lin | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / ODBC | Severity: | S1 (Critical) |
Version: | 8.0.27 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[9 Mar 2022 23:31]
Stephen Lin
[10 Mar 2022 15:49]
Stephen Lin
test code
Attachment: odbcsql.cpp (text/plain), 19.29 KiB.
[11 Mar 2022 10:47]
Bogdan Degtyariov
Verified, the problem occurs when NO_CACHE=1 is activated.
[7 Apr 2022 5:39]
Bogdan Degtyariov
Posted by developer: Documentation Note: The fix for this bug is to make the ODBC driver to correctly process NULL values obtained from prepared statement resultset when records caching is disabled by NO_CACHE=1. Previously having a NULL value in a row column would nullify a value in the same column of next row. Thus producing wrong result and giving NULL where a non-NULL value should be.
[7 Apr 2022 21:25]
Philip Olson
Posted by developer: Fixed as of the upcoming MySQL Connector/ODBC 8.0.29 release, and here's the proposed changelog entry from the documentation team: With prepared statements and NO_CACHE=1, having a NULL value in a row column would nullify a value in the same column of the next row. This produced an incorrect value giving NULL where a non-value was expected. Thank you for the bug report.