Commit d4f299b7 d4f299b7624cae2cf65d4ba3fdac98de82c97454 by Christian Gerdes

Added a quick fix for issue #5 by catching the condition of value to

high to fit into a java.lang.Long and change the value to Long.MAX_VALUE
instead. This occurred on the stats value named "prefetch clients -
default"
on some systems (value was a 22 byte number).
1 parent c3cb46d9
No preview for this file type
No preview for this file type
......@@ -9,7 +9,17 @@ class Collector {
public void update(ResultSet rset) throws Throwable {
while(rset.next()) {
updateValue(rset.getTimestamp(1), rset.getString(2), rset.getLong(3));
// Add try catch for issue #5
Timestamp ts = rset.getTimestamp(1);
String name = rset.getString(2);
Long value;
try {
value = rset.getLong(3);
}
catch (java.sql.SQLException e) {
value = Long.MAX_VALUE;
}
updateValue(ts, name, value);
}
rset.close();
}
......