Bug #102589 SQLProcedureColumns function returns incomplete results
Submitted: 12 Feb 23:54 Modified: 12 Mar 22:26
Reporter: Tom Fehrs Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:8.0.23 OS:Microsoft Windows (Window 10)
Assigned to: CPU Architecture:Any
Tags: ODBC, x86

[12 Feb 23:54] Tom Fehrs
Description:
The ODBC SQLProcedureColumns function returns incomplete results 

SQLGetFunctions (SQL_API_SQLPROCEDURECOLUMNS) indicates the SQLProcedureColumns function is supported but fetches after a call to it only returns the first 40 parameters.

Attached is a zip file with the C++ project built with VS2013, along with scripts for creating table and stored procedure and steps to reproduce

How to repeat:
See attached StepsToReproduce.txt
[12 Feb 23:56] Tom Fehrs
Test code, scripts and steps to reproduce

Attachment: test_SQLProcedureColumns.zip (application/x-zip-compressed, text), 7.72 KiB.

[13 Feb 12:55] MySQL Verification Team
Thank you for the bug report and test case.
[16 Feb 12:35] Bogdan Degtyariov
This is not a solution, but a temporary workaround until the ODBC Driver is fixed.
To allow SQLProcedureColumns() return more columns you can increase group_concat_max_len server variable.

For that particular connection it can be set by running the following query:

SET SESSION group_concat_max_len = 1000000;

or it can be set in the server config:

[mysqld]
group-concat-max-len = 1000000
[16 Feb 14:14] Tom Fehrs
Bogdan Degtyariov, Thank you for the workaround options. They may prove suitable for the customer.
[12 Mar 22:26] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Connector/ODBC 8.0.24 release, and here's the proposed changelog entry from the documentation team:

The ODBC SQLProcedureColumns function returns incomplete results, fetches
after usage would only return the first 40 parameters. 

The workaround was to increase the group_concat_max_len size, for example
'group-concat-max-len = 1000000' under [mysqld].

Thank you for the bug report.