Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
Description
https://docs.oracle.com/javase/8/docs/api/java/sql/ResultSetMetaData.html#getColumnTypeName-int- says that getColumnTypeName "Returns: type name used by the database.", but for LONGTEXT type it will return VARCHAR.
Also apparently MEDIUMTEXT and TEXT are affected. For TINYTEXT VARCHAR is probably ok
The solution could be to change the branch in the switch in the method to look like
case VARSTRING:
case VARCHAR:
if (binary)
if (len < 0)
{ return "LONGTEXT"; }else if (len <= 255)
{ return "VARCHAR"; }else if (len <= 65535)
{ return "TEXT"; }else if (len <= 16777215)
{ return "MEDIUMTEXT"; }else
{ return "LONGTEXT"; }