You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The NULLABLE and IS_NULLABLE information of a column returned by FBDatabaseMetaData.getColumns() is wrong, if the columns type is a domain. [JDBC100]
#138
When using the FBDatabaseMetaData.getColumns() method to check wether a column is nullable or not, the method will return wrong values for columns, wich are defined by a domain.
I looked in the source code and i think a found the problem:
The getColumns method of FBDatabaseMetaData reads out the RDB$NULL_FLAG field of the RDB$RELATION_FIELDS table to get the columns nullable information. If the columns type is a domain the RDB$NULL_FLAG field will be null, but the domain itself could defined as not null. So this method should also check the RDB$NULL_FLAG of the RDB$FIELDS table.
I compiled the driver with the followings changes and it seems to work fine for me now. It would be nice, if similar changes are made in the offical release.
Submitted by: Jens Kieselbach (chukku)
Assigned to: Roman Rokytskyy (rrokytskyy)
When using the FBDatabaseMetaData.getColumns() method to check wether a column is nullable or not, the method will return wrong values for columns, wich are defined by a domain.
I looked in the source code and i think a found the problem:
The getColumns method of FBDatabaseMetaData reads out the RDB$NULL_FLAG field of the RDB$RELATION_FIELDS table to get the columns nullable information. If the columns type is a domain the RDB$NULL_FLAG field will be null, but the domain itself could defined as not null. So this method should also check the RDB$NULL_FLAG of the RDB$FIELDS table.
I compiled the driver with the followings changes and it seems to work fine for me now. It would be nice, if similar changes are made in the offical release.
Thanks
Jens Kieselbach
[...]
// the changes are marked with a comment
[...]
Commits: 7434d15 88da735
The text was updated successfully, but these errors were encountered: