提交 90e48a7c 编写于 作者: Z zyyang

change

上级 b29c531d
...@@ -93,6 +93,7 @@ public abstract class AbstractConnection extends WrapperImpl implements Connecti ...@@ -93,6 +93,7 @@ public abstract class AbstractConnection extends WrapperImpl implements Connecti
public void setCatalog(String catalog) throws SQLException { public void setCatalog(String catalog) throws SQLException {
if (isClosed()) if (isClosed())
throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_CONNECTION_CLOSED); throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_CONNECTION_CLOSED);
/*
try (Statement stmt = createStatement()) { try (Statement stmt = createStatement()) {
boolean execute = stmt.execute("use " + catalog); boolean execute = stmt.execute("use " + catalog);
if (execute) if (execute)
...@@ -100,6 +101,9 @@ public abstract class AbstractConnection extends WrapperImpl implements Connecti ...@@ -100,6 +101,9 @@ public abstract class AbstractConnection extends WrapperImpl implements Connecti
} catch (SQLException e) { } catch (SQLException e) {
// do nothing // do nothing
} }
*/
this.catalog = catalog;
} }
@Override @Override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册