提交 0d73d707 编写于 作者: S Serge Rider

JDBC savepoint management fix (unwrap DBC model)

上级 efa437dc
......@@ -827,12 +827,15 @@ class ResultSetPersister {
DBeaverUI.syncExec(new Runnable() {
@Override
public void run() {
for (int i = 0; i < rows.size(); i++) {
if (refreshValues[i] != null) {
rows.get(i).values = refreshValues[i];
// Update only if metadata wasn't changed
if (!viewer.getControl().isDisposed() && viewer.getModel().getAttributes() == curAttributes) {
for (int i = 0; i < rows.size(); i++) {
if (refreshValues[i] != null) {
rows.get(i).values = refreshValues[i];
}
}
viewer.redrawData(true);
}
viewer.redrawData(true);
}
});
return Status.OK_STATUS;
......
......@@ -344,7 +344,9 @@ public class JDBCExecutionContext extends AbstractExecutionContext<JDBCDataSourc
{
try {
if (savepoint != null) {
if (savepoint instanceof Savepoint) {
if (savepoint instanceof JDBCSavepointImpl) {
getConnection().rollback(((JDBCSavepointImpl) savepoint).getOriginal());
} else if (savepoint instanceof Savepoint) {
getConnection().rollback((Savepoint) savepoint);
} else {
throw new SQLFeatureNotSupportedException(ModelMessages.model_jdbc_exception_bad_savepoint_object);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册