Bug #89536 Stored procedure output variables not set
Submitted: 5 Feb 2018 13:53 Modified: 23 Feb 2021 12:35
Reporter: Gary Brookman Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:5.3.9 OS:Windows (7)
Assigned to: CPU Architecture:Any
Tags: 32bit, ODBC

[5 Feb 2018 13:53] Gary Brookman
Description:
I'm running stored procedures from a C++ program using ODBC.

Input parameters work, and I can iterate a result set of a select, but output parameters are always zero. The same code works when pointed to a MS SQL DSN.

Attached is the C++ code built with VS2017.

// Stored procedure
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `Simple`(OUT oi int)
BEGIN
SET oi = 57;
END$$
DELIMITER ; 

How to repeat:
Add SP/tables, create 32 bit DSN, change C++ code to use your DSN, build and run from VS2017.
[5 Feb 2018 13:56] Gary Brookman
C++ source, console app testing SP through ODBC

Attachment: ODBC_SP.cpp (text/plain), 21.81 KiB.

[15 Aug 2019 22:08] Dennis Langer
I have the same issue, tested with MySQL ODBC 5.2 and 8.0 under Windows 10, using C++ compiled with VS2015 and VS2017.
[8 Feb 2021 19:50] Tom Fehrs
This is still an issue. Tested with MySQL ODBC 8.0.20 unicode driver connecting  mySQL 8.0.20. Windows 10.

This bug was logged 3 years ago. Is there an ETA on a fix?
[8 Feb 2021 23:05] MySQL Verification Team
https://bugs.mysql.com/bug.php?id=102534 marked as duplicate of this one.
[23 Feb 2021 12:20] MySQL Verification Team
Hello Gary Brookman,

Thank you for the bug report.
Imho this is duplicate of Bug #83698, please see Bug #83698.

Regards,
Ashwini Patil
[23 Feb 2021 12:35] Gary Brookman
Thanks Ashwini,

Since it only took 3 years to determine this was a duplicate, and the original reporting is over 4 years old, I suspect I'll be seeing a fix any moment now. 

Gary