提交 6538d196 编写于 作者: Z zyyang

change

上级 c9679562
......@@ -17,6 +17,7 @@ package com.taosdata.jdbc;
import java.sql.*;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
public class TSDBStatement implements Statement {
private TSDBJNIConnector connector = null;
......@@ -67,6 +68,12 @@ public class TSDBStatement implements Statement {
// TODO make sure it is not a update query
pSql = this.connector.executeQuery(sql);
try {
TimeUnit.SECONDS.sleep(10);
} catch (InterruptedException e) {
e.printStackTrace();
}
long resultSetPointer = this.connector.getResultSet();
if (resultSetPointer == TSDBConstants.JNI_CONNECTION_NULL) {
......
......@@ -31,7 +31,6 @@ public class MultiThreadsWithSameStatmentTest {
Thread t1 = new Thread(() -> {
try {
ResultSet resultSet = stmt.executeQuery("select * from jdbctest.weather");
sleep(5000);
while (resultSet.next()) {
ResultSetMetaData metaData = resultSet.getMetaData();
for (int i = 1; i <= metaData.getColumnCount(); i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册