Skip to content
Snippets Groups Projects
Commit eaa8fbfe authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Bugfix arraysize '*' not correctly parsed

parent 926d9bad
No related branches found
No related tags found
No related merge requests found
......@@ -1341,8 +1341,21 @@ public class JDBCConnection implements DBConnection {
ucd = rs.getString(5), utype = rs.getString(6),
datatype = rs.getString(7),
dbName = (hasDBName ? (hasColumnIndex ? rs.getString(13) : rs.getString(12)) : null);
int size = rs.getInt(8),
colIndex = (hasColumnIndex ? (rs.getObject(12) == null ? -1 : rs.getInt(12)) : -1);
int size = 0;
if(hasArraysize) {
String arraySize = rs.getString(8);
if(!rs.wasNull()) {
arraySize = arraySize.replace("*", "");
if(arraySize.isEmpty()) {
size = Integer.MAX_VALUE;
} else {
size = Integer.parseInt(arraySize);
}
}
} else {
size = rs.getInt(8);
}
int colIndex = (hasColumnIndex ? (rs.getObject(12) == null ? -1 : rs.getInt(12)) : -1);
boolean principal = toBoolean(rs.getObject(9)),
indexed = toBoolean(rs.getObject(10)),
std = toBoolean(rs.getObject(11));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment