[CONJ-809] SelectResultSet's (ResultSet)MetaData always indicates all columns to be readonly Created: 2020-07-22  Updated: 2020-07-23  Resolved: 2020-07-22

Status: Closed
Project: MariaDB Connector/J
Component/s: JDBC compatibility, metadata
Affects Version/s: 2.6.1
Fix Version/s: 2.6.2

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


 Description   

org.mariadb.jdbc.internal.com.read.resultset.SelectResultSet#getMetadata always returns a MariaDbResultSetMetaData which is not updatable, which results in isReadOnly(int column) to always return true

JDBC state that https://docs.oracle.com/en/java/javase/11/docs/api/java.sql/java/sql/ResultSetMetaData.html#isReadOnly(int) Indicates whether the designated column is definitely not writable. Driver indicate that resultset not an updatable resultset and all its columns are readOnly.

Instead only effectively readOnly-columns should return true

PS: discussion leading to this Issue https://lists.launchpad.net/maria-discuss/msg05864.html



 Comments   
Comment by Diego Dupin [ 2020-07-22 ]

this is due to https://jira.mariadb.org/browse/CONJ-788 introduced in last version, but writable value has been set incorrectly, based on column is updatable with an updatable resultset, not on the fact that column is read only.

Comment by Clemens [ 2020-07-23 ]

succesfully tested with 2.6.2!
Thx!

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