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

Documentation.

上级 341be22e
......@@ -25,18 +25,18 @@ Change Log
</li><li>JaQu: the static map Db.TOKENS was not synchronized.
</li><li>DatabaseMetaData.getProcedureColumns returned the wrong data
(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),
and multiple threads used the same connection,
</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 the same query but different prepared statements,
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.
</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>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>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.
</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
......@@ -49,7 +49,7 @@ Change Log
</li></ul>
<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.
</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.
......
......@@ -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
(the optimizer should swap a and b here).
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.
</li><li>The full condition should be sent to the linked table, not just the indexed condition.
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 {
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() {
return canReuse;
}
/**
* The command is now re-used, therefore reset the canReuse flag, and the
* parameter values.
*/
public void reuse() {
canReuse = false;
ArrayList<? extends ParameterInterface> parameters = getParameters();
......
......@@ -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() {
return false;
}
......
......@@ -346,8 +346,4 @@ public abstract class FileSystem {
*/
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 {
boolean result = false;
for (int i = 0;; i++) {
String f = getFileName(fileName, i);
if (getFileSystem(f).exists(f)) {
result = getFileSystem(f).setReadOnly(f);
if (getInstance(f).exists(f)) {
result = getInstance(f).setReadOnly(f);
} else {
break;
}
......@@ -52,12 +52,12 @@ public class FileSystemSplit extends FileSystemWrapper {
public void copy(String source, String target) {
source = unwrap(source);
target = unwrap(target);
getFileSystem(source).copy(source, target);
getInstance(source).copy(source, target);
for (int i = 1;; i++) {
String o = getFileName(source, i);
if (getFileSystem(o).exists(o)) {
if (getInstance(o).exists(o)) {
String c = getFileName(target, i);
getFileSystem(o).copy(o, c);
getInstance(o).copy(o, c);
} else {
break;
}
......@@ -68,8 +68,8 @@ public class FileSystemSplit extends FileSystemWrapper {
fileName = unwrap(fileName);
for (int i = 0;; i++) {
String f = getFileName(fileName, i);
if (getFileSystem(fileName).exists(f)) {
getFileSystem(fileName).delete(f);
if (getInstance(fileName).exists(f)) {
getInstance(fileName).delete(f);
} else {
break;
}
......@@ -81,8 +81,8 @@ public class FileSystemSplit extends FileSystemWrapper {
long lastModified = 0;
for (int i = 0;; i++) {
String f = getFileName(fileName, i);
if (getFileSystem(fileName).exists(f)) {
long l = getFileSystem(fileName).getLastModified(fileName);
if (getInstance(fileName).exists(f)) {
long l = getInstance(fileName).getLastModified(fileName);
lastModified = Math.max(lastModified, l);
} else {
break;
......@@ -96,8 +96,8 @@ public class FileSystemSplit extends FileSystemWrapper {
long length = 0;
for (int i = 0;; i++) {
String f = getFileName(fileName, i);
if (getFileSystem(fileName).exists(f)) {
length += getFileSystem(fileName).length(f);
if (getInstance(fileName).exists(f)) {
length += getInstance(fileName).length(f);
} else {
break;
}
......@@ -124,11 +124,11 @@ public class FileSystemSplit extends FileSystemWrapper {
public InputStream openFileInputStream(String fileName) throws IOException {
fileName = unwrap(fileName);
InputStream input = getFileSystem(fileName).openFileInputStream(fileName);
InputStream input = getInstance(fileName).openFileInputStream(fileName);
for (int i = 1;; i++) {
String f = getFileName(fileName, i);
if (getFileSystem(f).exists(f)) {
InputStream i2 = getFileSystem(f).openFileInputStream(f);
if (getInstance(f).exists(f)) {
InputStream i2 = getInstance(f).openFileInputStream(f);
input = new SequenceInputStream(input, i2);
} else {
break;
......@@ -140,12 +140,12 @@ public class FileSystemSplit extends FileSystemWrapper {
public FileObject openFileObject(String fileName, String mode) throws IOException {
fileName = unwrap(fileName);
ArrayList<FileObject> list = New.arrayList();
FileObject o = getFileSystem(fileName).openFileObject(fileName, mode);
FileObject o = getInstance(fileName).openFileObject(fileName, mode);
list.add(o);
for (int i = 1;; i++) {
String f = getFileName(fileName, i);
if (getFileSystem(fileName).exists(f)) {
o = getFileSystem(f).openFileObject(f, mode);
if (getInstance(fileName).exists(f)) {
o = getInstance(f).openFileObject(f, mode);
list.add(o);
} else {
break;
......@@ -203,9 +203,9 @@ public class FileSystemSplit extends FileSystemWrapper {
newName = unwrap(newName);
for (int i = 0;; i++) {
String o = getFileName(oldName, i);
if (getFileSystem(o).exists(o)) {
if (getInstance(o).exists(o)) {
String n = getFileName(newName, i);
getFileSystem(n).rename(o, n);
getInstance(n).rename(o, n);
} else {
break;
}
......@@ -216,8 +216,8 @@ public class FileSystemSplit extends FileSystemWrapper {
fileName = unwrap(fileName);
for (int i = 0;; i++) {
String f = getFileName(fileName, i);
if (getFileSystem(fileName).exists(f)) {
boolean ok = getFileSystem(fileName).tryDelete(f);
if (getInstance(fileName).exists(f)) {
boolean ok = getInstance(fileName).tryDelete(f);
if (!ok) {
return false;
}
......
......@@ -475,6 +475,7 @@ public abstract class Table extends SchemaObjectBase {
* multi-column index. If it is, an exception is thrown. Single-column
* references and indexes are dropped.
*
* @param session the session
* @param col the column
* @throws SQLException if the column is referenced by multi-column
* constraints or indexes
......
......@@ -35,14 +35,14 @@ public class TestAlter extends TestBase {
deleteDb("alter");
conn = getConnection("alter");
stat = conn.createStatement();
testAlterTableDropColumWithReferences();
testAlterTableDropColumnWithReferences();
testAlterTableAlterColumn();
testAlterTableDropIdentityColumn();
conn.close();
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 child(p int primary key)");
......
......@@ -76,6 +76,9 @@ public class TestFunctions extends TestBase implements AggregateFunction {
conn.close();
}
/**
* This method is called via reflection from the database.
*/
public static void testDefaultConn() throws SQLException {
DriverManager.getConnection("jdbc:default:connection");
}
......
......@@ -28,7 +28,7 @@ public class TestTempTableCrash {
new TestTempTableCrash().test();
}
public void test() throws Exception {
private void test() throws Exception {
Connection conn;
Statement stat;
......
......@@ -28,7 +28,7 @@ public class TestUndoLogLarge {
new TestUndoLogLarge().test();
}
public void test() throws SQLException {
private void test() throws SQLException {
DeleteDbFiles.execute("data", "test", true);
Connection conn = DriverManager.getConnection("jdbc:h2:data/test");
Statement stat = conn.createStatement();
......
......@@ -30,7 +30,7 @@ public class TestUndoLogMemory {
// 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
DeleteDbFiles.execute("data", "test", true);
......
......@@ -466,10 +466,17 @@ public class BuildBase {
if (quiet) {
System.setOut(filter(System.out, new String[] {
"Loading source files for package",
"Constructing Javadoc information",
"Constructing Javadoc information...",
"Generating ",
"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");
......
......@@ -668,4 +668,5 @@ requeried requery closable curr outdated market accurate borg theis welford
ooq exceeded eye hannibal stels garringer czech prevention propagate
compromise portion nodded rapping door stealing napping artifacts lore
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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论