change
This commit is contained in:
parent
c967956212
commit
6538d19603
|
@ -17,6 +17,7 @@ package com.taosdata.jdbc;
|
||||||
import java.sql.*;
|
import java.sql.*;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
public class TSDBStatement implements Statement {
|
public class TSDBStatement implements Statement {
|
||||||
private TSDBJNIConnector connector = null;
|
private TSDBJNIConnector connector = null;
|
||||||
|
@ -67,6 +68,12 @@ public class TSDBStatement implements Statement {
|
||||||
// TODO make sure it is not a update query
|
// TODO make sure it is not a update query
|
||||||
pSql = this.connector.executeQuery(sql);
|
pSql = this.connector.executeQuery(sql);
|
||||||
|
|
||||||
|
try {
|
||||||
|
TimeUnit.SECONDS.sleep(10);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
long resultSetPointer = this.connector.getResultSet();
|
long resultSetPointer = this.connector.getResultSet();
|
||||||
|
|
||||||
if (resultSetPointer == TSDBConstants.JNI_CONNECTION_NULL) {
|
if (resultSetPointer == TSDBConstants.JNI_CONNECTION_NULL) {
|
||||||
|
|
|
@ -31,7 +31,6 @@ public class MultiThreadsWithSameStatmentTest {
|
||||||
Thread t1 = new Thread(() -> {
|
Thread t1 = new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
ResultSet resultSet = stmt.executeQuery("select * from jdbctest.weather");
|
ResultSet resultSet = stmt.executeQuery("select * from jdbctest.weather");
|
||||||
sleep(5000);
|
|
||||||
while (resultSet.next()) {
|
while (resultSet.next()) {
|
||||||
ResultSetMetaData metaData = resultSet.getMetaData();
|
ResultSetMetaData metaData = resultSet.getMetaData();
|
||||||
for (int i = 1; i <= metaData.getColumnCount(); i++) {
|
for (int i = 1; i <= metaData.getColumnCount(); i++) {
|
||||||
|
|
Loading…
Reference in New Issue