[CONJ-223] MariaDbParameterMetaData.getParameterCount() function does not return correct result Created: 2015-11-22  Updated: 2015-11-22  Resolved: 2015-11-22

Status: Closed
Project: MariaDB Connector/J
Component/s: Other
Affects Version/s: 1.3.0
Fix Version/s: 1.3.2

Type: Bug Priority: Major
Reporter: Hayk Varderesyan Assignee: Diego Dupin
Resolution: Fixed Votes: 0
Labels: None

Attachments: Text File mariadb-connector-j.patch    

 Description   

MariaDBParameterMetaData.getParameterCount() function returns* columnInformations.length* instead parameterCount

P.S.
Very basic info about the parameterized query, only reliable method is getParameterCount().

Currently is the only function the wrong result supplies



 Comments   
Comment by Hayk Varderesyan [ 2015-11-22 ]

A possible fix I've also created and attached on the task.
See: mariadb-connector-j.patch

Comment by Diego Dupin [ 2015-11-22 ]

Very basic info about the parameterized query, only reliable method is getParameterCount().
twist of fate

The problem was as you point in your patch : columnInformations were used instead of parameterInformations.
(columnInformation that was used in parameter correspond to result field - nothing related to parameter).

Correction link :
https://github.com/MariaDB/mariadb-connector-j/commit/76cfdfe2007a282010736f2608baea12506fd313

Travis result :
https://travis-ci.org/MariaDB/mariadb-connector-j/builds/92595386

Generated at Thu Feb 08 03:14:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.