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

[5 Feb 2018 13:53] Gary Brookman
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
CREATE DEFINER=`root`@`localhost` PROCEDURE `Simple`(OUT oi int)
SET oi = 57;

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.