krummas / DrizzleJDBC

A BSD licensed JDBC driver for Drizzle and MySQL
BSD 3-Clause "New" or "Revised" License
31 stars 22 forks source link

rs.getInt() behaves differently than Connector/J #9

Closed WoozyG closed 11 years ago

WoozyG commented 11 years ago

if the string value is larger than Integer.MAX_VALUE or smaller than Integer.MIN_VALUE, Drizzle JDBC throws a NumberFormatException. Connector/J returns the appropriate MAX/MIN int value, unless the string value truly isn't a number.

Yes, this is less than ideal, as the caller should know to ask for a long or double, but among other things Hibernate expects all columns to be sized in an integer range, but MySQL reports 4GB in bytes for the size of a LONG_TEXT column defined as UTF8, among other things. This breaks Hibernate's automatic schema update functionality.