Bug #111107 | CallableStatement::getParameterMetaData reports incorrect parameterCount | ||
---|---|---|---|
Submitted: | 22 May 2023 15:54 | Modified: | 15 Dec 2023 23:32 |
Reporter: | Jason Boyer | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 8.0.33, 8.1.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[22 May 2023 15:54]
Jason Boyer
[22 May 2023 19:15]
Jason Boyer
This only occurs when the query parameter count differs from the metadata parameter account. In the example: - the metadata parameter count is 4 because there are four procedure parameters, including the two NULLs. - the query parameter count is 2 because there are two occurrences of "?" If the both counts are the same (i.e. all procedure parameters are specified with placeholders) the the code path leading to this bug is not followed, and it returns the correct number of results.
[18 Aug 2023 14:06]
Jason Boyer
This bug is still present in version 8.1.0.
[18 Nov 2023 0:11]
Filipe Silva
Hi Jason, Thanks for you interest in MySQL Connector/J and for taking the time to file this report. This bug was verified as reported.
[15 Dec 2023 23:32]
Daniel So
Posted by developer: Added the following entry to the Connector/J 8.3.0 changelog: "ParameterMetaData.getParameterCount() did not report the correct number for a procedure called through a PreparedStatement when not all the procedure parameters were not specified in the query statement."