This commit is contained in:
zyyang 2021-02-20 16:12:05 +08:00
parent b29c531d78
commit 90e48a7ce0
1 changed files with 4 additions and 0 deletions

View File

@ -93,6 +93,7 @@ public abstract class AbstractConnection extends WrapperImpl implements Connecti
public void setCatalog(String catalog) throws SQLException {
if (isClosed())
throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_CONNECTION_CLOSED);
/*
try (Statement stmt = createStatement()) {
boolean execute = stmt.execute("use " + catalog);
if (execute)
@ -100,6 +101,9 @@ public abstract class AbstractConnection extends WrapperImpl implements Connecti
} catch (SQLException e) {
// do nothing
}
*/
this.catalog = catalog;
}
@Override