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

--no commit message

--no commit message
上级 f2c4f557
...@@ -18,7 +18,9 @@ Change Log ...@@ -18,7 +18,9 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>Parser: sequenceName.NEXTVAL and CURRVAL did not respect the schema search path. <ul><li>Issue 111: Multi-version concurrency / duplicate primary key after rollback.
</li><li>Issue 110: Multi-version concurrency / wrong exception is thrown.
</li><li>Parser: sequenceName.NEXTVAL and CURRVAL did not respect the schema search path.
</li><li>The following sequence could throw the exception "Row not found when trying to delete": </li><li>The following sequence could throw the exception "Row not found when trying to delete":
start a transaction, insert many rows, delete many rows, rollback. The number of rows depends start a transaction, insert many rows, delete many rows, rollback. The number of rows depends
on the cache size. on the cache size.
......
...@@ -115,7 +115,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -115,7 +115,7 @@ public class JdbcConnection extends TraceObject implements Connection {
if (isInfoEnabled()) { if (isInfoEnabled()) {
trace.infoCode("Connection " + getTraceObjectName() trace.infoCode("Connection " + getTraceObjectName()
+ " = DriverManager.getConnection(" + quote(ci.getOriginalURL()) + " = DriverManager.getConnection(" + quote(ci.getOriginalURL())
+ ", " + quote(user) + ", \"\")"); + ", " + quote(user) + ", \"\");");
} }
this.url = ci.getURL(); this.url = ci.getURL();
openStackTrace = new Exception("Stack Trace"); openStackTrace = new Exception("Stack Trace");
......
...@@ -191,17 +191,6 @@ public class Trace { ...@@ -191,17 +191,6 @@ public class Trace {
} }
} }
/**
* Write Java source code with trace level INFO to the trace system.
*
* @param java the source code
*/
public void infoCode(String java) {
if (isEnabled(TraceSystem.INFO)) {
traceWriter.write(TraceSystem.INFO, module, lineSeparator + "/**/" + java, null);
}
}
/** /**
* Write a SQL statement with trace level INFO to the trace system. * Write a SQL statement with trace level INFO to the trace system.
* *
...@@ -269,6 +258,17 @@ public class Trace { ...@@ -269,6 +258,17 @@ public class Trace {
} }
} }
/**
* Write Java source code with trace level INFO to the trace system.
*
* @param java the source code
*/
public void infoCode(String java) {
if (isEnabled(TraceSystem.INFO)) {
traceWriter.write(TraceSystem.INFO, module, lineSeparator + "/**/" + java, null);
}
}
/** /**
* Write Java source code with trace level DEBUG to the trace system. * Write Java source code with trace level DEBUG to the trace system.
* *
......
...@@ -95,9 +95,11 @@ public class Row extends Record implements SearchRow { ...@@ -95,9 +95,11 @@ public class Row extends Record implements SearchRow {
buff.append(" deleted"); buff.append(" deleted");
} }
buff.append(" */ "); buff.append(" */ ");
for (Value v : data) { if (data != null) {
buff.appendExceptFirst(", "); for (Value v : data) {
buff.append(v == null ? "null" : v.getTraceSQL()); buff.appendExceptFirst(", ");
buff.append(v == null ? "null" : v.getTraceSQL());
}
} }
return buff.append(')').toString(); return buff.append(')').toString();
} }
......
...@@ -293,8 +293,16 @@ java org.h2.test.TestAll timer ...@@ -293,8 +293,16 @@ java org.h2.test.TestAll timer
System.setProperty("h2.maxMemoryRowsDistinct", "128"); System.setProperty("h2.maxMemoryRowsDistinct", "128");
System.setProperty("h2.check2", "true"); System.setProperty("h2.check2", "true");
int test2;
//System.setProperty("h2.optimizeInList", "true");
/* /*
OPTIMIZE_IN_LIST
use ... parameters (main, Message.getSQLException, trace?)
H2 Console: if number of items is low (calculate that first), display data types, otherwise not.
Always display indexes and views in all schemas.
------------- -------------
create a short documentation create a short documentation
......
...@@ -46,6 +46,7 @@ public class TestAutoReconnect extends TestBase implements DatabaseEventListener ...@@ -46,6 +46,7 @@ public class TestAutoReconnect extends TestBase implements DatabaseEventListener
connServer.createStatement().execute("SHUTDOWN"); connServer.createStatement().execute("SHUTDOWN");
connServer.close(); connServer.close();
} }
org.h2.Driver.load();
connServer = DriverManager.getConnection(url); connServer = DriverManager.getConnection(url);
} else { } else {
server.stop(); server.stop();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论