提交 5ed9f403 authored 作者: Thomas Mueller's avatar Thomas Mueller

A Java function that returns a result set that was generated using the provided…

A Java function that returns a result set that was generated using the provided connection could cause an internal error in some cases. Now such result sets are copied early on.
上级 1272b374
...@@ -898,7 +898,7 @@ public class DataType { ...@@ -898,7 +898,7 @@ public class DataType {
if (x instanceof SimpleResultSet) { if (x instanceof SimpleResultSet) {
return ValueResultSet.get((ResultSet) x); return ValueResultSet.get((ResultSet) x);
} }
return ValueResultSet.getCopy((ResultSet) x, 0); return ValueResultSet.getCopy((ResultSet) x, Integer.MAX_VALUE);
} else if (x instanceof UUID) { } else if (x instanceof UUID) {
UUID u = (UUID) x; UUID u = (UUID) x;
return ValueUuid.get(u.getMostSignificantBits(), u.getLeastSignificantBits()); return ValueUuid.get(u.getMostSignificantBits(), u.getLeastSignificantBits());
......
...@@ -114,7 +114,7 @@ public class ValueResultSet extends Value { ...@@ -114,7 +114,7 @@ public class ValueResultSet extends Value {
} }
protected int compareSecure(Value v, CompareMode mode) { protected int compareSecure(Value v, CompareMode mode) {
throw throwUnsupportedExceptionForType("<=>"); return this == v ? 0 : super.toString().compareTo(v.toString());
} }
public boolean equals(Object other) { public boolean equals(Object other) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论