提交 862ac9b9 编写于 作者: Z zyyang

change

上级 b9506a70
...@@ -15,7 +15,9 @@ ...@@ -15,7 +15,9 @@
package com.taosdata.jdbc; package com.taosdata.jdbc;
import java.sql.*; import java.sql.*;
import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
public class TSDBStatement implements Statement { public class TSDBStatement implements Statement {
...@@ -170,13 +172,18 @@ public class TSDBStatement implements Statement { ...@@ -170,13 +172,18 @@ public class TSDBStatement implements Statement {
} }
public boolean execute(String sql) throws SQLException { public boolean execute(String sql) throws SQLException {
System.out.println(Thread.currentThread().getName() + " before execute " + System.currentTimeMillis() + "=====> isclosed: " + isClosed); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
System.out.println(Thread.currentThread().getName() + " before execute " + sdf.format(new Date()) + "=====> isclosed: " + isClosed);
if (isClosed) { if (isClosed) {
System.out.println(Thread.currentThread().getName() + " will throw " + System.currentTimeMillis() + "=====> isclosed: " + isClosed); System.out.println(Thread.currentThread().getName() + " will throw " + sdf.format(new Date()) + "=====> isclosed: " + isClosed);
throw new SQLException("Invalid method call on a closed statement."); throw new SQLException("Invalid method call on a closed statement.");
} }
boolean res = true; boolean res = true;
System.out.println(Thread.currentThread().getName() + " before JNI " + sdf.format(new Date()) + "=====> isclosed: " + isClosed);
pSql = this.connector.executeQuery(sql); pSql = this.connector.executeQuery(sql);
System.out.println(Thread.currentThread().getName() + " after JNI " + sdf.format(new Date()) + "=====> isclosed: " + isClosed);
long resultSetPointer = this.connector.getResultSet(); long resultSetPointer = this.connector.getResultSet();
if (resultSetPointer == TSDBConstants.JNI_CONNECTION_NULL) { if (resultSetPointer == TSDBConstants.JNI_CONNECTION_NULL) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册