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

Changes for version 1.4.x beta

上级 00ec767c
......@@ -2146,7 +2146,8 @@ Each table has a pseudo-column named ""_ROWID_"" that contains the unique row id
"Other Grammar","Time","
TIME 'hh:mm:ss'
","
A time literal.
A time literal. A value is between plus and minus 2 million hours
and has nanosecond resolution.
","
TIME '23:59:59'
"
......
......@@ -17,8 +17,29 @@ Change Log
<h1>Change Log</h1>
<h2>Changes in Version 1.4 Beta (unreleased)</h2>
<ul><li>Enable the new storage format for dates (system property "h2.storeLocalTime").
For the MVStore mode, this is always enabled, but with version 1.4
this is even enabled in the PageStore mode.
</li><li>Implicit relative paths are disabled (system property "h2.implicitRelativePath"),
so that the database URL jdbc:h2:test now needs to be written as jdbc:h2:./test.
</li><li>"select ... fetch first 1 row only" is supported with the regular mode.
This was disabled so far because "fetch" is now a keyword.
See also Mode.supportOffsetFetch.
</li><li>Byte arrays are now sorted in unsigned mode
(x'99' is larger than x'09').
(System property "h2.sortBinaryUnsigned", Mode.binaryUnsigned).
</li><li>Csv.getInstance will be removed in future versions of 1.4.
Use the public constructor instead.
</li><li>Remove support for the limited old-style outer join syntax using "(+)".
Use "outer join" instead.
System property "h2.oldStyleOuterJoin".
</li></ul>
<h2>Next Version (unreleased)</h2>
<ul><li>The stack trace of the exception "The object is already closed" is no longer logged by default.
<ul><li>The default user name for the Script, RunScript, Shell,
and CreateCluster tools are no longer "sa" but an empty string.
</li><li>The stack trace of the exception "The object is already closed" is no longer logged by default.
</li><li>If a value of a result set was itself a result set, the result
could only be read once.
</li><li>Column constraints are also visible in views (patch from Nicolas Fortin for H2GIS).
......
......@@ -28,20 +28,10 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li></ul>
<h2>Version 1.4.x: Planned Changes</h2>
<ul><li>Build the jar file for Java 6 by default (JDBC API 4.1).
</li><li>Enable the new storage format for dates (system property "h2.storeLocalTime").
Document time literals: between minus 2 million and 2 million hours with nanosecond resolution.
</li><li>Remove the old connection pool logic (system property "h2.fastConnectionPool").
</li><li>Disable implicit relative paths (system property "h2.implicitRelativePath").
</li><li>Enable Mode.supportOffsetFetch by default, so that "select 1 fetch first 1 row only" works.
</li><li>Whether byte arrays should be sorted in unsigned mode
(old behavior: x'99' is smaller than x'09').
(System property "h2.sortBinaryUnsigned", Mode.binaryUnsigned).
</li><li>The default user name should be an empty string and not "sa".
</li><li>Deprecate Csv.getInstance() (use the public constructor instead).
</li><li>Remove support for the old-style outer join syntax using "(+)" because it is buggy.
<ul><li>Remove Csv.getInstance().
</li><li>Change license to MPL 2.0.
</li><li>Document that FILE_LOCK=SERIALIZED is not supported with the MVStore mode.
</li><li>Use the MVStore with MVCC by default.
</li></ul>
<h2>Priority 1</h2>
......
......@@ -90,6 +90,7 @@ import org.h2.engine.FunctionAlias;
import org.h2.engine.Procedure;
import org.h2.engine.Right;
import org.h2.engine.Session;
import org.h2.engine.SysProperties;
import org.h2.engine.User;
import org.h2.engine.UserAggregate;
import org.h2.engine.UserDataType;
......@@ -2152,7 +2153,7 @@ public class Parser {
read(")");
} else {
Expression right = readConcat();
if (readIf("(") && readIf("+") && readIf(")")) {
if (SysProperties.OLD_STYLE_OUTER_JOIN && readIf("(") && readIf("+") && readIf(")")) {
// support for a subset of old-fashioned Oracle outer
// join with (+)
if (r instanceof ExpressionColumn &&
......@@ -2576,10 +2577,12 @@ public class Parser {
}
String name = readColumnIdentifier();
Schema s = database.findSchema(objectName);
if (s != null && readIf("(")) {
if ((SysProperties.OLD_STYLE_OUTER_JOIN && s != null) && readIf("(")) {
// only if the token before the dot is a valid schema name,
// otherwise the old style Oracle outer join doesn't work:
// t.x = t2.x(+)
// this additional check is not required if the old style outer joins
// are not supported
return readFunction(s, name);
} else if (readIf(".")) {
String schema = objectName;
......
......@@ -78,7 +78,7 @@ public class Mode {
* [OFFSET .. ROW|ROWS] [FETCH FIRST .. ROW|ROWS ONLY]
* as an alternative for LIMIT .. OFFSET.
*/
public boolean supportOffsetFetch;
public boolean supportOffsetFetch = Constants.VERSION_MINOR >= 4 ? true : false;
/**
* The system columns 'CTID' and 'OID' are supported.
......
......@@ -312,6 +312,13 @@ public class SysProperties {
public static final int OBJECT_CACHE_SIZE =
MathUtils.nextPowerOf2(Utils.getProperty("h2.objectCacheSize", 1024));
/**
* System property <code>h2.oldStyleOuterJoin</code> (default: true for version 1.3, false for version 1.4).<br />
* Limited support for the old-style Oracle outer join with "(+)".
*/
public static final boolean OLD_STYLE_OUTER_JOIN =
Utils.getProperty("h2.oldStyleOuterJoin", Constants.VERSION_MINOR >= 4 ? false : true);
/**
* System property <code>h2.pgClientEncoding</code> (default: UTF-8).<br />
* Default client encoding for PG server. It is used if the client does not
......@@ -360,12 +367,11 @@ public class SysProperties {
Utils.getProperty("h2.socketConnectTimeout", 2000);
/**
* System property <code>h2.sortBinaryUnsigned</code> (default: false).<br />
* System property <code>h2.sortBinaryUnsigned</code> (default: false with version 1.3, true with version 1.4).<br />
* Whether binary data should be sorted in unsigned mode (0xff is larger than 0x00).
*/
;
public static final boolean SORT_BINARY_UNSIGNED =
Utils.getProperty("h2.sortBinaryUnsigned", false);
Utils.getProperty("h2.sortBinaryUnsigned", Constants.VERSION_MINOR >= 4 ? true : false);
/**
* System property <code>h2.sortNullsHigh</code> (default: false).<br />
......@@ -384,12 +390,12 @@ public class SysProperties {
Utils.getProperty("h2.splitFileSizeShift", 30);
/**
* System property <code>h2.storeLocalTime</code> (default: false).<br />
* System property <code>h2.storeLocalTime</code> (default: false for version 1.3, true for version 1.4).<br />
* Store the local time. If disabled, the daylight saving offset is not
* taken into account.
*/
public static final boolean STORE_LOCAL_TIME =
Utils.getProperty("h2.storeLocalTime", false);
Utils.getProperty("h2.storeLocalTime", Constants.VERSION_MINOR >= 4 ? true : false);
/**
* System property <code>h2.syncMethod</code> (default: sync).<br />
......@@ -412,13 +418,12 @@ public class SysProperties {
Utils.getProperty("h2.traceIO", false);
/**
* System property <code>h2.implicitRelativePath</code> (default: true).<br />
* System property <code>h2.implicitRelativePath</code> (default: true for version 1.3, false for version 1.4).<br />
* If disabled, relative paths in database URLs need to be written as
* jdbc:h2:./test instead of jdbc:h2:test.
*/
;
public static final boolean IMPLICIT_RELATIVE_PATH =
Utils.getProperty("h2.implicitRelativePath", false);
Utils.getProperty("h2.implicitRelativePath", Constants.VERSION_MINOR >= 4 ? false : true);
/**
* System property <code>h2.urlMap</code> (default: null).<br />
......
......@@ -405,7 +405,7 @@ public class ObjectDataType implements DataType {
/**
* The base class for auto-detect data types.
*/
static abstract class AutoDetectDataType implements DataType {
abstract static class AutoDetectDataType implements DataType {
protected final ObjectDataType base;
protected final int typeId;
......
......@@ -57,7 +57,7 @@ public class CreateCluster extends Tool {
public void runTool(String... args) throws SQLException {
String urlSource = null;
String urlTarget = null;
String user = "sa";
String user = "";
String password = "";
String serverList = null;
for (int i = 0; args != null && i < args.length; i++) {
......
......@@ -90,7 +90,7 @@ public class RunScript extends Tool {
@Override
public void runTool(String... args) throws SQLException {
String url = null;
String user = "sa";
String user = "";
String password = "";
String script = "backup.sql";
String options = null;
......
......@@ -56,7 +56,7 @@ public class Script extends Tool {
@Override
public void runTool(String... args) throws SQLException {
String url = null;
String user = "sa";
String user = "";
String password = "";
String file = "backup.sql";
String options1 = null, options2 = null;
......
......@@ -320,7 +320,7 @@ public class Shell extends Tool implements Runnable {
private void connect() throws IOException, SQLException {
String url = "jdbc:h2:~/test";
String user = "sa";
String user = "";
String driver = null;
try {
Properties prop;
......
......@@ -630,7 +630,8 @@ public class ToChar {
output.append(cal.get(Calendar.DAY_OF_YEAR));
i += 3;
} else if ((cap = containsAt(format, i, "DD")) != null) {
output.append(String.format("%02d",cal.get(Calendar.DAY_OF_MONTH)));
output.append(String.format("%02d",
cal.get(Calendar.DAY_OF_MONTH)));
i += 2;
} else if ((cap = containsAt(format, i, "DY")) != null) {
String day = new SimpleDateFormat("EEE").format(ts).toUpperCase();
......@@ -754,7 +755,7 @@ public class ToChar {
output.append(cap.apply(month));
i += 3;
} else if ((cap = containsAt(format, i, "MM")) != null) {
output.append(String.format("%02d",cal.get(Calendar.MONTH) + 1));
output.append(String.format("%02d", cal.get(Calendar.MONTH) + 1));
i += 2;
} else if ((cap = containsAt(format, i, "RM")) != null) {
int month = cal.get(Calendar.MONTH) + 1;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论