提交 2f12cce5 authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 177b071b
...@@ -16,7 +16,13 @@ Change Log ...@@ -16,7 +16,13 @@ Change Log
<h1>Change Log</h1> <h1>Change Log</h1>
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul><li>Column aliases can now be used in GROUP BY and HAVING. <ul><li>The build target 'build jarSmall' now includes the embedded database.
</li><li>JdbcDataSource now keeps the password in a char array where possible.
</li><li>ResultSet.absolute did not always work with large result sets.
</li><li>Column aliases can now be used in GROUP BY and HAVING.
</li><li>Jason Brittain has contributed MySQL date functions. Thanks a lot!
They are not in the h2.jar file currently, but in src/tools/org/h2/mode/FunctionsMySQL.java.
To install, add this class to the classpath and call FunctionsMySQL.register(conn) in the Java code.
</li></ul> </li></ul>
<h2>Version 1.0.77 (2008-08-16)</h2> <h2>Version 1.0.77 (2008-08-16)</h2>
......
...@@ -363,10 +363,13 @@ The class and the method must both be public, and the method must be static. ...@@ -363,10 +363,13 @@ The class and the method must both be public, and the method must be static.
Admin rights are required to execute this command. Admin rights are required to execute this command.
If the first parameter of the Java function is a java.sql.Connection, then If the first parameter of the Java function is a java.sql.Connection, then
the current to the database is provided. This connection must not be closed. the current to the database is provided. This connection must not be closed.
Functions may be overloaded, that means multiple functions with the same name may exist. If the class contains multiple methods with the given name but different parameter count,
In this case, each function must have a different parameter count. all methods are mapped.
"," ","
CREATE ALIAS MY_SQRT FOR ""java.lang.Math.sqrt"" CREATE ALIAS MY_SQRT FOR ""java.lang.Math.sqrt"";
CREATE ALIAS GET_SYSTEM_PROPERTY FOR ""java.lang.System.getProperty"";
CALL GET_SYSTEM_PROPERTY('java.class.path');
CALL GET_SYSTEM_PROPERTY('com.acme.test', 'true');
" "
"Commands (DDL)","CREATE CONSTANT"," "Commands (DDL)","CREATE CONSTANT","
......
...@@ -122,6 +122,13 @@ public class DateTimeUtils { ...@@ -122,6 +122,13 @@ public class DateTimeUtils {
return ValueTimestamp.getNoCopy(y); return ValueTimestamp.getNoCopy(y);
} }
/**
* Convert the date value to UTC using the given calendar.
*
* @param source the source calendar
* @param x the date
* @return the UTC number of milliseconds.
*/
private static long getUniversalTime(Calendar source, java.util.Date x) throws SQLException { private static long getUniversalTime(Calendar source, java.util.Date x) throws SQLException {
if (source == null) { if (source == null) {
throw Message.getInvalidValueException("calendar", null); throw Message.getInvalidValueException("calendar", null);
......
...@@ -78,7 +78,7 @@ public class Build extends BuildBase { ...@@ -78,7 +78,7 @@ public class Build extends BuildBase {
* Compile all classes * Compile all classes
*/ */
public void compile() { public void compile() {
compile(true, false); compile(true, false, false);
} }
/** /**
...@@ -92,11 +92,11 @@ public class Build extends BuildBase { ...@@ -92,11 +92,11 @@ public class Build extends BuildBase {
} }
} }
private void compile(boolean debugInfo, boolean clientOnly) { private void compile(boolean debugInfo, boolean clientOnly, boolean basicResourcesOnly) {
switchSource(); switchSource();
clean(); clean();
mkdir("temp"); mkdir("temp");
resources(clientOnly); resources(clientOnly, basicResourcesOnly);
download(); download();
String classpath = "temp" + String classpath = "temp" +
File.pathSeparator + "ext/servlet-api-2.4.jar" + File.pathSeparator + "ext/servlet-api-2.4.jar" +
...@@ -206,8 +206,10 @@ public class Build extends BuildBase { ...@@ -206,8 +206,10 @@ public class Build extends BuildBase {
compile(); compile();
manifest("H2 Database Engine", "org.h2.tools.Console"); manifest("H2 Database Engine", "org.h2.tools.Console");
FileList files = getFiles("temp"). FileList files = getFiles("temp").
exclude("temp/org/h2/dev/*").
exclude("temp/org/h2/build/*"). exclude("temp/org/h2/build/*").
exclude("temp/org/h2/dev/*").
exclude("temp/org/h2/jaqu/*").
exclude("temp/org/h2/mode/*").
exclude("temp/org/h2/samples/*"). exclude("temp/org/h2/samples/*").
exclude("temp/org/h2/test/*"). exclude("temp/org/h2/test/*").
exclude("*.bat"). exclude("*.bat").
...@@ -221,10 +223,12 @@ public class Build extends BuildBase { ...@@ -221,10 +223,12 @@ public class Build extends BuildBase {
* implementation. * implementation.
*/ */
public void jarClient() { public void jarClient() {
compile(true, true); compile(true, true, false);
FileList files = getFiles("temp"). FileList files = getFiles("temp").
exclude("temp/org/h2/dev/*").
exclude("temp/org/h2/build/*"). exclude("temp/org/h2/build/*").
exclude("temp/org/h2/dev/*").
exclude("temp/org/h2/jaqu/*").
exclude("temp/org/h2/mode/*").
exclude("temp/org/h2/samples/*"). exclude("temp/org/h2/samples/*").
exclude("temp/org/h2/test/*"). exclude("temp/org/h2/test/*").
exclude("*.bat"). exclude("*.bat").
...@@ -241,20 +245,22 @@ public class Build extends BuildBase { ...@@ -241,20 +245,22 @@ public class Build extends BuildBase {
* Debug information is disabled. * Debug information is disabled.
*/ */
public void jarSmall() { public void jarSmall() {
compile(false, false); compile(false, false, true);
FileList files = getFiles("temp"). FileList files = getFiles("temp").
exclude("temp/org/h2/dev/*"). exclude("temp/org/h2/bnf/*").
exclude("temp/org/h2/build/*"). exclude("temp/org/h2/build/*").
exclude("temp/org/h2/dev/*").
exclude("temp/org/h2/fulltext/*").
exclude("temp/org/h2/jaqu/*").
exclude("temp/org/h2/jdbcx/*").
exclude("temp/org/h2/mode/*").
exclude("temp/org/h2/samples/*"). exclude("temp/org/h2/samples/*").
exclude("temp/org/h2/server/*").
exclude("temp/org/h2/test/*"). exclude("temp/org/h2/test/*").
exclude("temp/org/h2/tools/*").
exclude("*.bat"). exclude("*.bat").
exclude("*.sh"). exclude("*.sh").
exclude("*.txt"). exclude("*.txt");
exclude("temp/META-INF/*");
zip("temp/h2classes.zip", files, "temp", true, true);
manifest("H2 Database Engine (Embedded)", "org.h2.tools.Console\nClass-Path: h2classes.zip");
files = getFiles("temp/h2classes.zip");
files.addAll(getFiles("temp/META-INF"));
jar("bin/h2small.jar", files, "temp"); jar("bin/h2small.jar", files, "temp");
} }
...@@ -263,7 +269,7 @@ public class Build extends BuildBase { ...@@ -263,7 +269,7 @@ public class Build extends BuildBase {
* implementation. All other jar files do not include JaQu. * implementation. All other jar files do not include JaQu.
*/ */
public void jarJaqu() { public void jarJaqu() {
compile(true, false); compile(true, false, true);
manifest("H2 JaQu", ""); manifest("H2 JaQu", "");
FileList files = getFiles("temp/org/h2/jaqu"); FileList files = getFiles("temp/org/h2/jaqu");
files.addAll(getFiles("temp/META-INF/MANIFEST.MF")); files.addAll(getFiles("temp/META-INF/MANIFEST.MF"));
...@@ -368,12 +374,15 @@ public class Build extends BuildBase { ...@@ -368,12 +374,15 @@ public class Build extends BuildBase {
"-DgroupId=com.h2database" }); "-DgroupId=com.h2database" });
} }
private void resources(boolean clientOnly) { private void resources(boolean clientOnly, boolean basicOnly) {
FileList files = getFiles("src/main"). FileList files = getFiles("src/main").
exclude("*.MF"). exclude("*.MF").
exclude("*.java"). exclude("*.java").
exclude("*/package.html"). exclude("*/package.html").
exclude("*/java.sql.Driver"); exclude("*/java.sql.Driver");
if (basicOnly) {
files = files.keep("src/main/org/h2/res/_messages_en.*");
}
if (clientOnly) { if (clientOnly) {
files = files.exclude("src/main/org/h2/server/*"); files = files.exclude("src/main/org/h2/server/*");
} }
......
...@@ -99,7 +99,7 @@ public class CheckJavadoc { ...@@ -99,7 +99,7 @@ public class CheckJavadoc {
inComment = true; inComment = true;
} }
if (inComment) { if (inComment) {
if (line.length() > MAX_COMMENT_LINE_SIZE) { if (line.length() > MAX_COMMENT_LINE_SIZE && !line.trim().startsWith("* http://")) {
System.out.println("Long line : " + file.getAbsolutePath() System.out.println("Long line : " + file.getAbsolutePath()
+ " (" + file.getName() + ":" + lineNumber + ")"); + " (" + file.getName() + ":" + lineNumber + ")");
errorCount++; errorCount++;
......
...@@ -556,4 +556,5 @@ harbor generics pojo annotations ecl subclipse jmx bean plugins team cha emma ...@@ -556,4 +556,5 @@ harbor generics pojo annotations ecl subclipse jmx bean plugins team cha emma
nullsoft annotation cover scriptable guidelines consider batis coding nullsoft annotation cover scriptable guidelines consider batis coding
anlytc art orafusion ery ideas jequel indices quaere dsl accumulated vary anlytc art orafusion ery ideas jequel indices quaere dsl accumulated vary
causing nopack water onto resolve ontoprise treatment sparql rdfs piman zen causing nopack water onto resolve ontoprise treatment sparql rdfs piman zen
owl rdf recommendations axiom fabric broker osoa epictetus owl rdf recommendations axiom fabric broker osoa epictetus replacements
brittain wasn november unixtime ddd jason formatter
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论