Bug #96582 jdbc.MysqlParameterMetadata#isNullable doesnt check whether to be simple

Submitted: 19 Aug 2019 4:47 Modified: 20 Dec 2023 21:26
Reporter: Daren Klamer Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / J Severity:S3 (Non-critical)
Version:8.0.17 OS:Any
Assigned to: CPU Architecture:Any

[19 Aug 2019 4:47] Daren Klamer
Description:
It seems as though com.mysql.cj.jdbc.MysqlParameterMetadata#isNullable doesn't check whether to return simple meta data or not, whereas all the other related methods do. 

Perhaps when this is true the driver can return https://docs.oracle.com/javase/7/docs/api/java/sql/ParameterMetaData.html#parameterNullabl... ?

How to repeat:
Invoke com.mysql.cj.jdbc.MysqlParameterMetadata#isNullable even when generateSimpleParameterMetdata is set to true on the connection URL

Suggested fix:
Return https://docs.oracle.com/javase/7/docs/api/java/sql/ParameterMetaData.html#parameterNullabl... when com.mysql.cj.jdbc.MysqlParameterMetadata#returnSimpleMetadata is true
[23 Aug 2019 13:59] Alexander Soklakov
Hi Daren,

Right, it makes sense, thanks! Verified by code review.
[20 Dec 2023 21:26] Daniel So
Posted by developer:
 
Added the following entry to the Connector/J 8.3.0 changelog:

"MysqlParameterMetadata.isNullable() ignored the value of the connection property generateSimpleParameterMetadata when returning a value. With this fix, the method returns ParameterMetaData.parameterNullableUnknown when generateSimpleParameterMetadata is true."

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.