提交 7e7ce289 authored 作者: Thomas Mueller's avatar Thomas Mueller

Formatting / change log

上级 d3bd6b1d
...@@ -21,6 +21,10 @@ Change Log ...@@ -21,6 +21,10 @@ Change Log
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul> <ul>
<li>A thread deadlock detector (disabled by default) can help
detect and analyze Java level deadlocks.
To enable, set the system property "h2.threadDeadlockDetector" to true.
</li>
<li>MVStore: power failure could corrupt the store, if writes were re-ordered. <li>MVStore: power failure could corrupt the store, if writes were re-ordered.
</li> </li>
<li>For compatibility with other databases, support for (double and float) <li>For compatibility with other databases, support for (double and float)
......
...@@ -896,8 +896,13 @@ public class Database implements DataHandler { ...@@ -896,8 +896,13 @@ public class Database implements DataHandler {
return wasLocked; return wasLocked;
} }
/**
* Unlock the metadata table.
*
* @param session the session
*/
public void unlockMeta(Session session) { public void unlockMeta(Session session) {
meta.unlock(session); meta.unlock(session);
} }
/** /**
...@@ -2350,9 +2355,16 @@ public class Database implements DataHandler { ...@@ -2350,9 +2355,16 @@ public class Database implements DataHandler {
return meta == null || meta.isLockedExclusively(); return meta == null || meta.isLockedExclusively();
} }
/**
* Checks if the system table (containing the catalog) is locked by the
* given session.
*
* @param session the session
* @return true if it is currently locked
*/
public boolean isSysTableLockedBy(Session session) { public boolean isSysTableLockedBy(Session session) {
return meta == null || meta.isLockedExclusivelyBy(session); return meta == null || meta.isLockedExclusivelyBy(session);
} }
/** /**
* Open a new connection or get an existing connection to another database. * Open a new connection or get an existing connection to another database.
...@@ -2781,9 +2793,15 @@ public class Database implements DataHandler { ...@@ -2781,9 +2793,15 @@ public class Database implements DataHandler {
} }
} }
/**
* Get the table engine class, loading it if needed.
*
* @param tableEngine the table engine name
* @return the class
*/
public TableEngine getTableEngine(String tableEngine) { public TableEngine getTableEngine(String tableEngine) {
assert Thread.holdsLock(this); assert Thread.holdsLock(this);
TableEngine engine = tableEngines.get(tableEngine); TableEngine engine = tableEngines.get(tableEngine);
if (engine == null) { if (engine == null) {
try { try {
...@@ -2795,5 +2813,5 @@ public class Database implements DataHandler { ...@@ -2795,5 +2813,5 @@ public class Database implements DataHandler {
} }
return engine; return engine;
} }
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论