[CONJ-85] MySQLType.GEOMETRY not handled in MySQLValueObject.getObject() Created: 2014-03-10  Updated: 2014-12-09  Resolved: 2014-12-09

Status: Closed
Project: MariaDB Connector/J
Component/s: None
Affects Version/s: 1.1.5
Fix Version/s: 1.1.8

Type: Bug Priority: Blocker
Reporter: Adalbert Dawid Assignee: Massimo Siani (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Environment:

MySQL 5.5.35 on Debian Linux



 Description   

When accessing a column of MySQL type LINESTRING, the MariaDB JDBC driver crashes as follows:
java.lang.RuntimeException: GEOMETRY
at org.mariadb.jdbc.internal.mysql.MySQLValueObject.getObject(MySQLValueObject.java:153)
at org.mariadb.jdbc.MySQLResultSet.getObject(MySQLResultSet.java:434)
[...]

In the debugger I see that the column was typed as MySQLType.GEOMETRY in MySQLType.fromServer(), but MySQLValueObject.getObject() does not handle this case and throws an exception instead.



 Comments   
Comment by Adalbert Dawid [ 2014-03-10 ]

An obvious solution seems to be adding the lines

case GEOMETRY:
return getBytes();

to the switch statement.

However, in addition to GEOMETRY, NEWDATE, ENUM and SET are not handled in MySQLValueObject.getObject() either, so maybe these types have been skipped deliberately and I just don't get it?

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