[CONJ-526] Wrong error message when calling ParameterMetaData getParameterCount() with incorrect SQL in PreparedStatement Created: 2017-09-14 Updated: 2017-09-20 Resolved: 2017-09-18 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | Other |
| Affects Version/s: | 2.1.1 |
| Fix Version/s: | 1.6.5, 2.1.2 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Rafael Lopez Fernández | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
When calling getParameterCount() from the ParameterMetaData of a PreparedStatement with incorrect SQL, it fails with "Parameter metadata not available for these statement" instead of "You have an error in your SQL syntax; ..." For example:
fails with
Corrected version:
fails with
Attached example:
I think one possible workaround is to change setParametersData() method in
|
| Comments |
| Comment by Diego Dupin [ 2017-09-18 ] | |||||||||||||||
|
Thanks for reporting that. This will be corrected in 2.2.0 version and 1.6.5 version (actually available in snapshot :
|