提交 baf60c6e authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 fbb95e9d
...@@ -248,9 +248,9 @@ public class Constants { ...@@ -248,9 +248,9 @@ public class Constants {
public static int MAX_FILE_RETRY = Math.max(1, getIntSetting("h2.maxFileRetry", 16)); public static int MAX_FILE_RETRY = Math.max(1, getIntSetting("h2.maxFileRetry", 16));
public static boolean LOB_CLOSE_BETWEEN_READS = getBooleanSetting("h2.lobCloseBetweenReads", false); public static boolean LOB_CLOSE_BETWEEN_READS = getBooleanSetting("h2.lobCloseBetweenReads", false);
public static boolean INDEX_OLD = getBooleanSetting("h2.indexOld", false); public static boolean INDEX_OLD = getBooleanSetting("h2.indexOld", false);
public static final boolean INDEX_LOOKUP_NEW = getBooleanSetting("h2.indexLookupNew", true); public static final boolean INDEX_LOOKUP_NEW = getBooleanSetting("h2.indexLookupNew", true);
public static final boolean TRACE_IO = getBooleanSetting("h2.traceIO", false); public static final boolean TRACE_IO = getBooleanSetting("h2.traceIO", false);
public static final int DATASOURCE_TRACE_LEVEL = getIntSetting("h2.dataSourceTraceLevel", TraceSystem.ERROR); public static final int DATASOURCE_TRACE_LEVEL = getIntSetting("h2.dataSourceTraceLevel", TraceSystem.ERROR);
public static boolean getBooleanSetting(String name, boolean defaultValue) { public static boolean getBooleanSetting(String name, boolean defaultValue) {
String s = System.getProperty(name); String s = System.getProperty(name);
......
...@@ -68,10 +68,10 @@ implements XAConnection, XAResource, JdbcConnectionListener ...@@ -68,10 +68,10 @@ implements XAConnection, XAResource, JdbcConnectionListener
public void close() throws SQLException { public void close() throws SQLException {
debugCodeCall("close"); debugCodeCall("close");
try { try {
closeConnection(conn); closeConnection(conn);
closeConnection(connSentinel); closeConnection(connSentinel);
} finally { } finally {
conn = null; conn = null;
connSentinel = null; connSentinel = null;
} }
} }
...@@ -94,8 +94,8 @@ implements XAConnection, XAResource, JdbcConnectionListener ...@@ -94,8 +94,8 @@ implements XAConnection, XAResource, JdbcConnectionListener
public Connection getConnection() throws SQLException { public Connection getConnection() throws SQLException {
debugCodeCall("getConnection"); debugCodeCall("getConnection");
if(conn != null) { if(conn != null) {
closeConnection(conn); closeConnection(conn);
conn = null; conn = null;
} }
conn = openConnection(); conn = openConnection();
conn.setJdbcConnectionListener(this); conn.setJdbcConnectionListener(this);
......
...@@ -335,7 +335,7 @@ public class Message { ...@@ -335,7 +335,7 @@ public class Message {
if(e instanceof JdbcSQLException) { if(e instanceof JdbcSQLException) {
JdbcSQLException j = (JdbcSQLException) e; JdbcSQLException j = (JdbcSQLException) e;
if(j.getSQL() != null) { if(j.getSQL() != null) {
return j; return j;
} }
return new JdbcSQLException(j.getOriginalMessage(), j.getSQL(), return new JdbcSQLException(j.getOriginalMessage(), j.getSQL(),
j.getSQLState(), j.getSQLState(),
......
...@@ -132,7 +132,7 @@ public class TcpServerThread implements Runnable { ...@@ -132,7 +132,7 @@ public class TcpServerThread implements Runnable {
String message; String message;
String sql; String sql;
if(e instanceof JdbcSQLException) { if(e instanceof JdbcSQLException) {
JdbcSQLException j = (JdbcSQLException) e; JdbcSQLException j = (JdbcSQLException) e;
message = j.getOriginalMessage(); message = j.getOriginalMessage();
sql = j.getSQL(); sql = j.getSQL();
} else { } else {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论