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

Documentation.

上级 341be22e
...@@ -25,18 +25,18 @@ Change Log ...@@ -25,18 +25,18 @@ Change Log
</li><li>JaQu: the static map Db.TOKENS was not synchronized. </li><li>JaQu: the static map Db.TOKENS was not synchronized.
</li><li>DatabaseMetaData.getProcedureColumns returned the wrong data </li><li>DatabaseMetaData.getProcedureColumns returned the wrong data
(it also returned the Connection parameter if there was any). (it also returned the Connection parameter if there was any).
</li><li>Issue 284: If the query cache was used (enabled by default in version 1.3.x), </li><li>Issue 284: If the query cache was used (enabled by default in version 1.3.x),
and multiple threads used the same connection, and multiple threads used the same connection,
and the same query but different prepared statements, and the same query but different prepared statements,
parameters of one prepared statement could be overwritten by another. parameters of one prepared statement could be overwritten by another.
</li><li>If the query cache was used (enabled by default in version 1.3.x), </li><li>If the query cache was used (enabled by default in version 1.3.x),
parameters of re-used queries were not reset in prepared statements. parameters of re-used queries were not reset in prepared statements.
</li><li>CallableStatement: the first row of the result set was skipped when using CallableStatement.execute(). </li><li>CallableStatement: the first row of the result set was skipped when using CallableStatement.execute().
</li><li>Batch update exceptions now include the root cause and all chained exceptions (getNextException). </li><li>Batch update exceptions now include the root cause and all chained exceptions (getNextException).
</li><li>Reading a large result set with a BLOB or CLOB column could throw a NullPointerException. </li><li>Reading a large result set with a BLOB or CLOB column could throw a NullPointerException.
</li><li>Support for the MS SQL Server syntax VARCHAR(MAX). </li><li>Support for the MS SQL Server syntax VARCHAR(MAX).
</li><li>The Recover tool could print "/ by zero" on an empty database. </li><li>The Recover tool could print "/ by zero" on an empty database.
</li><li>For tables without a single column primary key of type INT or LONG, </li><li>For tables without a single column primary key of type INT or LONG,
the unique row id had gaps, which didn't look nice. the unique row id had gaps, which didn't look nice.
</li><li>Each table now has a pseudo-column "_ROWID_" to get the unique row id (only enabled for version 1.3.x). </li><li>Each table now has a pseudo-column "_ROWID_" to get the unique row id (only enabled for version 1.3.x).
</li><li>User defined functions can now have parameters of any class. Values of type </li><li>User defined functions can now have parameters of any class. Values of type
...@@ -49,7 +49,7 @@ Change Log ...@@ -49,7 +49,7 @@ Change Log
</li></ul> </li></ul>
<h2>Version 1.3.150 Beta (2011-01-28)</h2> <h2>Version 1.3.150 Beta (2011-01-28)</h2>
<ul><li>CSVREAD / CSVWRITE: instead of setting the options one by one, <ul><li>CSVREAD / CSVWRITE: instead of setting the options one by one,
all options can be combined into a space separated key-value pairs. all options can be combined into a space separated key-value pairs.
</li><li>CSVREAD / CSV tool: there is a new option "lineCommentCharacter" to set or disable line comments. </li><li>CSVREAD / CSV tool: there is a new option "lineCommentCharacter" to set or disable line comments.
For H2 version 1.2, the default is '#' (as before). For H2 version 1.3, line comments are disabled by default. For H2 version 1.2, the default is '#' (as before). For H2 version 1.3, line comments are disabled by default.
......
...@@ -549,7 +549,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>. ...@@ -549,7 +549,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
select * from test a inner join test b on a.id=b.id inner join o on o.id=a.id where b.x=1 select * from test a inner join test b on a.id=b.id inner join o on o.id=a.id where b.x=1
(the optimizer should swap a and b here). (the optimizer should swap a and b here).
See also TestNestedJoins. See also TestNestedJoins.
</li><li>Compatibility with MySQL: support non-strict mode (sql_mode = "") any data </li><li>Compatibility with MySQL: support non-strict mode (sql_mode = "") any data
that is too large for the column will just be truncated or set to the default value. that is too large for the column will just be truncated or set to the default value.
</li><li>The full condition should be sent to the linked table, not just the indexed condition. </li><li>The full condition should be sent to the linked table, not just the indexed condition.
Example: TestLinkedTableFullCondition Example: TestLinkedTableFullCondition
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -283,10 +283,19 @@ public abstract class Command implements CommandInterface { ...@@ -283,10 +283,19 @@ public abstract class Command implements CommandInterface {
return false; return false;
} }
/**
* Whether the command is already closed (in which case it can be re-used).
*
* @return true if it can be re-used
*/
public boolean canReuse() { public boolean canReuse() {
return canReuse; return canReuse;
} }
/**
* The command is now re-used, therefore reset the canReuse flag, and the
* parameter values.
*/
public void reuse() { public void reuse() {
canReuse = false; canReuse = false;
ArrayList<? extends ParameterInterface> parameters = getParameters(); ArrayList<? extends ParameterInterface> parameters = getParameters();
......
...@@ -598,20 +598,6 @@ public class ConstraintReferential extends Constraint { ...@@ -598,20 +598,6 @@ public class ConstraintReferential extends Constraint {
} }
} }
public boolean containsColumn(Column col) {
for (IndexColumn c : columns) {
if (c.column == col) {
return true;
}
}
for (IndexColumn c : refColumns) {
if (c.column == col) {
return true;
}
}
return false;
}
public boolean isBefore() { public boolean isBefore() {
return false; return false;
} }
......
...@@ -346,8 +346,4 @@ public abstract class FileSystem { ...@@ -346,8 +346,4 @@ public abstract class FileSystem {
*/ */
public abstract String unwrap(String fileName); public abstract String unwrap(String fileName);
protected static FileSystem getFileSystem(String fileName) {
return FileSystem.getInstance(fileName);
}
} }
...@@ -40,8 +40,8 @@ public class FileSystemSplit extends FileSystemWrapper { ...@@ -40,8 +40,8 @@ public class FileSystemSplit extends FileSystemWrapper {
boolean result = false; boolean result = false;
for (int i = 0;; i++) { for (int i = 0;; i++) {
String f = getFileName(fileName, i); String f = getFileName(fileName, i);
if (getFileSystem(f).exists(f)) { if (getInstance(f).exists(f)) {
result = getFileSystem(f).setReadOnly(f); result = getInstance(f).setReadOnly(f);
} else { } else {
break; break;
} }
...@@ -52,12 +52,12 @@ public class FileSystemSplit extends FileSystemWrapper { ...@@ -52,12 +52,12 @@ public class FileSystemSplit extends FileSystemWrapper {
public void copy(String source, String target) { public void copy(String source, String target) {
source = unwrap(source); source = unwrap(source);
target = unwrap(target); target = unwrap(target);
getFileSystem(source).copy(source, target); getInstance(source).copy(source, target);
for (int i = 1;; i++) { for (int i = 1;; i++) {
String o = getFileName(source, i); String o = getFileName(source, i);
if (getFileSystem(o).exists(o)) { if (getInstance(o).exists(o)) {
String c = getFileName(target, i); String c = getFileName(target, i);
getFileSystem(o).copy(o, c); getInstance(o).copy(o, c);
} else { } else {
break; break;
} }
...@@ -68,8 +68,8 @@ public class FileSystemSplit extends FileSystemWrapper { ...@@ -68,8 +68,8 @@ public class FileSystemSplit extends FileSystemWrapper {
fileName = unwrap(fileName); fileName = unwrap(fileName);
for (int i = 0;; i++) { for (int i = 0;; i++) {
String f = getFileName(fileName, i); String f = getFileName(fileName, i);
if (getFileSystem(fileName).exists(f)) { if (getInstance(fileName).exists(f)) {
getFileSystem(fileName).delete(f); getInstance(fileName).delete(f);
} else { } else {
break; break;
} }
...@@ -81,8 +81,8 @@ public class FileSystemSplit extends FileSystemWrapper { ...@@ -81,8 +81,8 @@ public class FileSystemSplit extends FileSystemWrapper {
long lastModified = 0; long lastModified = 0;
for (int i = 0;; i++) { for (int i = 0;; i++) {
String f = getFileName(fileName, i); String f = getFileName(fileName, i);
if (getFileSystem(fileName).exists(f)) { if (getInstance(fileName).exists(f)) {
long l = getFileSystem(fileName).getLastModified(fileName); long l = getInstance(fileName).getLastModified(fileName);
lastModified = Math.max(lastModified, l); lastModified = Math.max(lastModified, l);
} else { } else {
break; break;
...@@ -96,8 +96,8 @@ public class FileSystemSplit extends FileSystemWrapper { ...@@ -96,8 +96,8 @@ public class FileSystemSplit extends FileSystemWrapper {
long length = 0; long length = 0;
for (int i = 0;; i++) { for (int i = 0;; i++) {
String f = getFileName(fileName, i); String f = getFileName(fileName, i);
if (getFileSystem(fileName).exists(f)) { if (getInstance(fileName).exists(f)) {
length += getFileSystem(fileName).length(f); length += getInstance(fileName).length(f);
} else { } else {
break; break;
} }
...@@ -124,11 +124,11 @@ public class FileSystemSplit extends FileSystemWrapper { ...@@ -124,11 +124,11 @@ public class FileSystemSplit extends FileSystemWrapper {
public InputStream openFileInputStream(String fileName) throws IOException { public InputStream openFileInputStream(String fileName) throws IOException {
fileName = unwrap(fileName); fileName = unwrap(fileName);
InputStream input = getFileSystem(fileName).openFileInputStream(fileName); InputStream input = getInstance(fileName).openFileInputStream(fileName);
for (int i = 1;; i++) { for (int i = 1;; i++) {
String f = getFileName(fileName, i); String f = getFileName(fileName, i);
if (getFileSystem(f).exists(f)) { if (getInstance(f).exists(f)) {
InputStream i2 = getFileSystem(f).openFileInputStream(f); InputStream i2 = getInstance(f).openFileInputStream(f);
input = new SequenceInputStream(input, i2); input = new SequenceInputStream(input, i2);
} else { } else {
break; break;
...@@ -140,12 +140,12 @@ public class FileSystemSplit extends FileSystemWrapper { ...@@ -140,12 +140,12 @@ public class FileSystemSplit extends FileSystemWrapper {
public FileObject openFileObject(String fileName, String mode) throws IOException { public FileObject openFileObject(String fileName, String mode) throws IOException {
fileName = unwrap(fileName); fileName = unwrap(fileName);
ArrayList<FileObject> list = New.arrayList(); ArrayList<FileObject> list = New.arrayList();
FileObject o = getFileSystem(fileName).openFileObject(fileName, mode); FileObject o = getInstance(fileName).openFileObject(fileName, mode);
list.add(o); list.add(o);
for (int i = 1;; i++) { for (int i = 1;; i++) {
String f = getFileName(fileName, i); String f = getFileName(fileName, i);
if (getFileSystem(fileName).exists(f)) { if (getInstance(fileName).exists(f)) {
o = getFileSystem(f).openFileObject(f, mode); o = getInstance(f).openFileObject(f, mode);
list.add(o); list.add(o);
} else { } else {
break; break;
...@@ -203,9 +203,9 @@ public class FileSystemSplit extends FileSystemWrapper { ...@@ -203,9 +203,9 @@ public class FileSystemSplit extends FileSystemWrapper {
newName = unwrap(newName); newName = unwrap(newName);
for (int i = 0;; i++) { for (int i = 0;; i++) {
String o = getFileName(oldName, i); String o = getFileName(oldName, i);
if (getFileSystem(o).exists(o)) { if (getInstance(o).exists(o)) {
String n = getFileName(newName, i); String n = getFileName(newName, i);
getFileSystem(n).rename(o, n); getInstance(n).rename(o, n);
} else { } else {
break; break;
} }
...@@ -216,8 +216,8 @@ public class FileSystemSplit extends FileSystemWrapper { ...@@ -216,8 +216,8 @@ public class FileSystemSplit extends FileSystemWrapper {
fileName = unwrap(fileName); fileName = unwrap(fileName);
for (int i = 0;; i++) { for (int i = 0;; i++) {
String f = getFileName(fileName, i); String f = getFileName(fileName, i);
if (getFileSystem(fileName).exists(f)) { if (getInstance(fileName).exists(f)) {
boolean ok = getFileSystem(fileName).tryDelete(f); boolean ok = getInstance(fileName).tryDelete(f);
if (!ok) { if (!ok) {
return false; return false;
} }
......
...@@ -475,6 +475,7 @@ public abstract class Table extends SchemaObjectBase { ...@@ -475,6 +475,7 @@ public abstract class Table extends SchemaObjectBase {
* multi-column index. If it is, an exception is thrown. Single-column * multi-column index. If it is, an exception is thrown. Single-column
* references and indexes are dropped. * references and indexes are dropped.
* *
* @param session the session
* @param col the column * @param col the column
* @throws SQLException if the column is referenced by multi-column * @throws SQLException if the column is referenced by multi-column
* constraints or indexes * constraints or indexes
......
...@@ -35,14 +35,14 @@ public class TestAlter extends TestBase { ...@@ -35,14 +35,14 @@ public class TestAlter extends TestBase {
deleteDb("alter"); deleteDb("alter");
conn = getConnection("alter"); conn = getConnection("alter");
stat = conn.createStatement(); stat = conn.createStatement();
testAlterTableDropColumWithReferences(); testAlterTableDropColumnWithReferences();
testAlterTableAlterColumn(); testAlterTableAlterColumn();
testAlterTableDropIdentityColumn(); testAlterTableDropIdentityColumn();
conn.close(); conn.close();
deleteDb("alter"); deleteDb("alter");
} }
private void testAlterTableDropColumWithReferences() throws SQLException { private void testAlterTableDropColumnWithReferences() throws SQLException {
stat.execute("create table parent(id int, b int)"); stat.execute("create table parent(id int, b int)");
stat.execute("create table child(p int primary key)"); stat.execute("create table child(p int primary key)");
......
...@@ -76,6 +76,9 @@ public class TestFunctions extends TestBase implements AggregateFunction { ...@@ -76,6 +76,9 @@ public class TestFunctions extends TestBase implements AggregateFunction {
conn.close(); conn.close();
} }
/**
* This method is called via reflection from the database.
*/
public static void testDefaultConn() throws SQLException { public static void testDefaultConn() throws SQLException {
DriverManager.getConnection("jdbc:default:connection"); DriverManager.getConnection("jdbc:default:connection");
} }
......
...@@ -28,7 +28,7 @@ public class TestTempTableCrash { ...@@ -28,7 +28,7 @@ public class TestTempTableCrash {
new TestTempTableCrash().test(); new TestTempTableCrash().test();
} }
public void test() throws Exception { private void test() throws Exception {
Connection conn; Connection conn;
Statement stat; Statement stat;
......
...@@ -28,7 +28,7 @@ public class TestUndoLogLarge { ...@@ -28,7 +28,7 @@ public class TestUndoLogLarge {
new TestUndoLogLarge().test(); new TestUndoLogLarge().test();
} }
public void test() throws SQLException { private void test() throws SQLException {
DeleteDbFiles.execute("data", "test", true); DeleteDbFiles.execute("data", "test", true);
Connection conn = DriverManager.getConnection("jdbc:h2:data/test"); Connection conn = DriverManager.getConnection("jdbc:h2:data/test");
Statement stat = conn.createStatement(); Statement stat = conn.createStatement();
......
...@@ -30,7 +30,7 @@ public class TestUndoLogMemory { ...@@ -30,7 +30,7 @@ public class TestUndoLogMemory {
// new TestUndoLogMemory().test(1000, "space(100000)"); // new TestUndoLogMemory().test(1000, "space(100000)");
} }
public void test(int count, String defaultValue) throws SQLException { private void test(int count, String defaultValue) throws SQLException {
// -Xmx1m -XX:+HeapDumpOnOutOfMemoryError // -Xmx1m -XX:+HeapDumpOnOutOfMemoryError
DeleteDbFiles.execute("data", "test", true); DeleteDbFiles.execute("data", "test", true);
......
...@@ -466,10 +466,17 @@ public class BuildBase { ...@@ -466,10 +466,17 @@ public class BuildBase {
if (quiet) { if (quiet) {
System.setOut(filter(System.out, new String[] { System.setOut(filter(System.out, new String[] {
"Loading source files for package", "Loading source files for package",
"Constructing Javadoc information", "Constructing Javadoc information...",
"Generating ", "Generating ",
"Standard Doclet", "Standard Doclet",
"Building " "Building tree for all the packages and classes...",
"Building index for all the packages and classes...",
"Building index for all classes..."
}));
} else {
System.setOut(filter(System.out, new String[] {
"Loading source files for package ",
"Generating ",
})); }));
} }
Class<?> clazz = Class.forName("com.sun.tools.javadoc.Main"); Class<?> clazz = Class.forName("com.sun.tools.javadoc.Main");
......
...@@ -668,4 +668,5 @@ requeried requery closable curr outdated market accurate borg theis welford ...@@ -668,4 +668,5 @@ requeried requery closable curr outdated market accurate borg theis welford
ooq exceeded eye hannibal stels garringer czech prevention propagate ooq exceeded eye hannibal stels garringer czech prevention propagate
compromise portion nodded rapping door stealing napping artifacts lore compromise portion nodded rapping door stealing napping artifacts lore
pondered curious muttered quaint chamber nearly unwrapped flows weary volume pondered curious muttered quaint chamber nearly unwrapped flows weary volume
tapping gently dreary wrapping tis moger udt chafik tapping gently dreary wrapping tis moger udt chafik outfile geom scalable
highly cloud infrastructure
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论