Issue Details (XML | Word | Printable)

Key: JDBC-462
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Mark Rotteveel
Reporter: John Kilin
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Jaybird JCA/JDBC Driver

FBBigDecimal, unsupported field sqltype: 481

Created: 28/Nov/16 10:30 AM   Updated: 18/Dec/16 03:30 PM
Component/s: JDBC driver
Affects Version/s: Jaybird 3.0.0-beta-1
Fix Version/s: Jaybird 3.0.0-beta-2, Jaybird 3.0.0


 Description  « Hide
I have the FB Server 2.5 with database in sql dialect 1.
When I try to select the field with type numeric(15, 2) by Jaybird-3.0.0-beta-1-JDK_1.8 i receive error:
Caused by: java.sql.SQLException: FBBigDecimal, unsupported field sqltype: 481
  at org.firebirdsql.jdbc.field.FBBigDecimalField.<init>(FBBigDecimalField.java:54)
  at org.firebirdsql.jdbc.field.FBField.createField(FBField.java:261)
  at org.firebirdsql.jdbc.field.FBField.createField(FBField.java:244)
  at org.firebirdsql.jdbc.AbstractResultSet.prepareVars(AbstractResultSet.java:253)
  at org.firebirdsql.jdbc.AbstractResultSet.<init>(AbstractResultSet.java:130)
  at org.firebirdsql.jdbc.FBResultSet.<init>(FBResultSet.java:46)
  at org.firebirdsql.jdbc.FBStatement.getResultSet(FBStatement.java:885)
  at org.firebirdsql.jdbc.FBStatement.getResultSet(FBStatement.java:865)
  at org.firebirdsql.jdbc.FBStatement.executeQuery(FBStatement.java:229)
  at org.pentaho.di.core.database.Database.openQuery(Database.java:1716)

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Mark Rotteveel added a comment - 28/Nov/16 11:02 AM
Thanks! The FBBigDecimalField has a nice TODO to check for dialect 1 support, so it looks like I forgot to do that.

Mark Rotteveel added a comment - 28/Nov/16 12:38 PM
In dialect 1 NUMERIC(15,2) is actually a double field; in Jaybird 2.2 this would lead to FBDoubleField being used, but due to an improvement in datatype identification Jaybird 3 now uses FBBigDecimalField which then doesn't support the fact dialect 1 uses double. To fix this, Jaybird 3 will also use FBDoubleField for this.

Mark Rotteveel added a comment - 28/Nov/16 12:56 PM
On closer scrutiny, I will extend FBBigDecimalField instead so it correctly handles this case for dialect 1.


John Kilin added a comment - 28/Nov/16 02:57 PM
Great, thanks! The fix is working.