提交 0c7e1ebc authored 作者: Thomas Mueller's avatar Thomas Mueller

When calling SHUTDOWN IMMEDIATELY in the server mode, the .trace.db file was not closed.

上级 1944438b
...@@ -18,7 +18,8 @@ Change Log ...@@ -18,7 +18,8 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>DatabaseMetaData.getPrimaryKeys: the wrong constraint name was reported <ul><li>When calling SHUTDOWN IMMEDIATELY in the server mode, the .trace.db file was not closed.
</li><li>DatabaseMetaData.getPrimaryKeys: the wrong constraint name was reported
if there was another constraint on the same table and columns. if there was another constraint on the same table and columns.
</li><li>AUTO_INCREMENT now works in the same way in ALTER TABLE ALTER COLUMN </li><li>AUTO_INCREMENT now works in the same way in ALTER TABLE ALTER COLUMN
as in CREATE TABLE (it does not create a primary key). as in CREATE TABLE (it does not create a primary key).
......
...@@ -153,6 +153,10 @@ public class TcpServerThread implements Runnable { ...@@ -153,6 +153,10 @@ public class TcpServerThread implements Runnable {
try { try {
Command rollback = session.prepareLocal("ROLLBACK"); Command rollback = session.prepareLocal("ROLLBACK");
rollback.executeUpdate(); rollback.executeUpdate();
} catch (Exception e) {
server.traceError(e);
}
try {
session.close(); session.close();
server.removeConnection(id); server.removeConnection(id);
} catch (Exception e) { } catch (Exception e) {
......
...@@ -50,8 +50,10 @@ public class TestDatabaseEventListener extends TestBase implements DatabaseEvent ...@@ -50,8 +50,10 @@ public class TestDatabaseEventListener extends TestBase implements DatabaseEvent
Properties p = new Properties(); Properties p = new Properties();
p.setProperty("user", user); p.setProperty("user", user);
p.setProperty("password", password); p.setProperty("password", password);
Connection conn = DriverManager.getConnection(url, p); Connection conn;
Statement stat = conn.createStatement(); Statement stat;
conn = DriverManager.getConnection(url, p);
stat = conn.createStatement();
// the old.id index head is at position 0 // the old.id index head is at position 0
stat.execute("create table old(id identity) as select 1"); stat.execute("create table old(id identity) as select 1");
// the test.id index head is at position 1 // the test.id index head is at position 1
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论