Bug #102534 Stored procedure output variables not set
Submitted: 8 Feb 2021 21:12 Modified: 9 Feb 2021 12:11
Reporter: Tom Fehrs Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:8.0.20 OS:Windows (Windows 10)
Assigned to: CPU Architecture:Any
Tags: 32bit, ODBC

[8 Feb 2021 21:12] Tom Fehrs
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:
How to repeat:
Add SP/tables, create 32 bit DSN, change C++ code to use your DSN, build and run from VS2017.
[8 Feb 2021 21:13] Tom Fehrs
C++ source, console app testing SP through ODBC

Attachment: ODBC_SP.cpp (application/octet-stream, text), 21.81 KiB.

[8 Feb 2021 23:05] MySQL Verification Team
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

https://bugs.mysql.com/bug.php?id=89536

Thank you for your interest in MySQL.
[9 Feb 2021 12:11] Tom Fehrs
The reason a duplicate was created was because no apparent action has been taken on the original for over 3 years. I thought maybe you misplaced the original.