提交 1f7b458f authored 作者: LaughingMan's avatar LaughingMan

Move exception checking before the SET CLUSTER calls

上级 3393ac72
......@@ -143,11 +143,6 @@ public class CreateCluster extends Tool {
{
RunScript.execute(connTarget, pipeReader);
// set the cluster to the serverList on both databases
statSource.executeUpdate("SET CLUSTER '" + serverList + "'");
statTarget.executeUpdate("SET CLUSTER '" + serverList + "'");
}
// Check if the writer encountered any exception
try {
threadFuture.get();
......@@ -157,6 +152,10 @@ public class CreateCluster extends Tool {
throw new SQLException(ex);
}
// set the cluster to the serverList on both databases
statSource.executeUpdate("SET CLUSTER '" + serverList + "'");
statTarget.executeUpdate("SET CLUSTER '" + serverList + "'");
}
} catch (IOException ex) {
throw new SQLException(ex);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论