Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ private List<List<String>> getColumnFields() {
if (column.getPrecision() > 0 && column.getScale() >= 0) {
type = type + "(" + column.getPrecision() + "," + column.getScale() + ")";
}
} else if ("varbinary".equalsIgnoreCase(type)) {
type = "blob";
}
columnValues.add(type.toLowerCase());
columnValues.add(column.isNullable() ? "YES" : "NO");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,8 @@ private static String getTypeName(String typeName, String elementTypeName) {
elementTypeName = "INT";
}
return elementTypeName + " " + typeName;
case "VARBINARY":
return "blob";
default:
return typeName;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,15 @@ private static Iterator<Object[]> getInformationColumns(String user, String host
type = "blob";
}
type = type.toLowerCase();
long precision = column.precision;
Long octetLength = null;
String dataType = column.getSqlTypeName();
if ("varbinary".equalsIgnoreCase(dataType)) {
dataType = "blob";
precision = 65535;
octetLength = 65535L;
}

colRes.add(new Object[]{
"def",
schemaTables.getSchemaInfo().getName(),
Expand All @@ -187,9 +196,9 @@ private static Iterator<Object[]> getInformationColumns(String user, String host
// is null
column.isNullable() ? "YES" : "NO",
// type name
column.getSqlTypeName(),
(long) column.precision,
null,
dataType,
precision,
octetLength,
null,
null,
null,
Expand Down
Loading