From d7dfde2d09aa53e1abe7800765d352a19226989b Mon Sep 17 00:00:00 2001 From: zyyang Date: Tue, 23 Feb 2021 17:51:05 +0800 Subject: [PATCH] change --- .../main/java/com/taosdata/jdbc/rs/RestfulStatement.java | 8 ++++---- .../java/com/taosdata/jdbc/rs/RestfulStatementTest.java | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/connector/jdbc/src/main/java/com/taosdata/jdbc/rs/RestfulStatement.java b/src/connector/jdbc/src/main/java/com/taosdata/jdbc/rs/RestfulStatement.java index e536e35def..aea1da89f7 100644 --- a/src/connector/jdbc/src/main/java/com/taosdata/jdbc/rs/RestfulStatement.java +++ b/src/connector/jdbc/src/main/java/com/taosdata/jdbc/rs/RestfulStatement.java @@ -75,8 +75,8 @@ public class RestfulStatement extends AbstractStatement { return executeOneQuery(url, sql); } - if (this.database == null || this.database.isEmpty()) - throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_DATABASE_NOT_SPECIFIED_OR_AVAILABLE); +// if (this.database == null || this.database.isEmpty()) +// throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_DATABASE_NOT_SPECIFIED_OR_AVAILABLE); HttpClientPoolUtil.execute(url, "use " + this.database); return executeOneQuery(url, sql); } @@ -93,8 +93,8 @@ public class RestfulStatement extends AbstractStatement { return executeOneUpdate(url, sql); } - if (this.database == null || this.database.isEmpty()) - throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_DATABASE_NOT_SPECIFIED_OR_AVAILABLE); +// if (this.database == null || this.database.isEmpty()) +// throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_DATABASE_NOT_SPECIFIED_OR_AVAILABLE); HttpClientPoolUtil.execute(url, "use " + this.database); return executeOneUpdate(url, sql); diff --git a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/rs/RestfulStatementTest.java b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/rs/RestfulStatementTest.java index 2fe93f85f8..df3542f59b 100644 --- a/src/connector/jdbc/src/test/java/com/taosdata/jdbc/rs/RestfulStatementTest.java +++ b/src/connector/jdbc/src/test/java/com/taosdata/jdbc/rs/RestfulStatementTest.java @@ -11,8 +11,8 @@ import java.util.Properties; import java.util.UUID; public class RestfulStatementTest { - private static final String host = "127.0.0.1"; - // private static final String host = "master"; +// private static final String host = "127.0.0.1"; + private static final String host = "master"; private static Connection conn; private static Statement stmt; -- GitLab