[vectorized](jdbc) fix jdbc connect sql server error (#16929)

This commit is contained in:
zhangstar333
2023-02-22 19:36:27 +08:00
committed by GitHub
parent 12b6786522
commit dc3dab5a23
2 changed files with 2 additions and 3 deletions

View File

@ -94,7 +94,7 @@ under the License.
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.2.8</version>
<version>1.2.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine -->
<dependency>

View File

@ -225,8 +225,7 @@ public class JdbcExecutor {
if (op == TJdbcOperation.READ) {
conn.setAutoCommit(false);
Preconditions.checkArgument(sql != null);
stmt = conn.prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY,
ResultSet.FETCH_FORWARD);
stmt = conn.prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
stmt.setFetchSize(batchSize);
batchSizeNum = batchSize;
} else {