提交 26e617c5 authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 85bdf82a
......@@ -1154,7 +1154,7 @@ The conversion between UTF-8 and Java encoding (using the \u syntax), as well as
Downloads
@download_1001_h3
Version 1.0.61 (2007-11-10, Current)
Version 1.0.62 (2007-11-25, Current)
@download_1002_a
Windows Installer
......@@ -3182,7 +3182,7 @@ JDBC and (partial) ODBC API; Web Client application
Download
@mainWeb_1007_td
Version 1.0.61 (2007-11-10):
Version 1.0.62 (2007-11-25):
@mainWeb_1008_a
Windows Installer (2.8 MB)
......
......@@ -1156,7 +1156,7 @@ Centralリポジトリの利用
ダウンロード
@download_1001_h3
#Version 1.0.61 (2007-11-10, Current)
#Version 1.0.62 (2007-11-25, Current)
@download_1002_a
Windows Installer
......@@ -3184,7 +3184,7 @@ JDBC、 (部分的な) ODBC API; Web クライアントアプリケーション
ダウンロード
@mainWeb_1007_td
#Version 1.0.61 (2007-11-10):
#Version 1.0.62 (2007-11-25):
@mainWeb_1008_a
#Windows Installer (2.8 MB)
......
......@@ -383,7 +383,7 @@ build_1032_li=Error messages\: src/main/org/h2/res/_messages_*.properties
build_1033_li=Web site\: src/docsrc/text/_docs_*.utf8.txt
build_1034_p=The conversion between UTF-8 and Java encoding (using the \\u syntax), as well as the HTML entities (&\#..;) is automated by running the tool PropertiesToUTF8. The web site translation is automated as well, using <code>ant docs</code> .
download_1000_h1=Downloads
download_1001_h3=Version 1.0.61 (2007-11-10, Current)
download_1001_h3=Version 1.0.62 (2007-11-25, Current)
download_1002_a=Windows Installer
download_1003_a=Platform-Independent Zip
download_1004_h3=Download Mirror
......@@ -1059,7 +1059,7 @@ mainWeb_1003_li=Written Java; can be compiled with GCJ (Linux)
mainWeb_1004_li=Embedded, Server and Cluster modes
mainWeb_1005_li=JDBC and (partial) ODBC API; Web Client application
mainWeb_1006_h3=Download
mainWeb_1007_td=Version 1.0.61 (2007-11-10)\:
mainWeb_1007_td=Version 1.0.62 (2007-11-25)\:
mainWeb_1008_a=Windows Installer (2.8 MB)
mainWeb_1009_a=All platforms (zip, 3.9 MB)
mainWeb_1010_a=All Downloads
......
......@@ -60,9 +60,10 @@ import org.h2.constant.SysProperties;
* - Scan for viruses
* - ant mavenDeployCentral
* - Upload to SourceForge
* - Newsletter: send without 'to unsubscribe...' to h2database-news@googlegroups.com, but
* - Newsletter: send without 'to unsubscribe...' to h2database-news@googlegroups.com
* - Newsletter: prepare, send (always send to BCC!!)
* - Add to freshmeat, http://code.google.com/p/h2database/downloads/list
* - Add to freshmeat
* - Upload to http://code.google.com/p/h2database/downloads/list
*
* @author Thomas
*/
......
......@@ -10,6 +10,37 @@ INSERT INTO CHANNEL VALUES('H2 Database Engine' ,
CREATE TABLE ITEM(ID INT PRIMARY KEY, TITLE VARCHAR, ISSUED TIMESTAMP, DESC VARCHAR);
INSERT INTO ITEM VALUES(32,
'New version available: 1.0.62 (2007-11-25)', '2007-11-25 12:00:00',
'A new version of H2 is available for <a href="http://www.h2database.com">download</a>.
(You may have to click ''Refresh'').
<br />
<b>Changes and new functionality:</b>
<ul><li>Large updates and deletes are now supported.
</li><li>Google Android is supported.
</li><li>Large CSV operations are now faster.
</li><li>A patch for Apache DDL Utils is available.
</li><li>Eduardo Velasques has translated H2 to Brazilian Portuguese.
</li><li>Now using custom toString() for JDBC objects.
</li><li>The setting h2.emergencySpaceInitial is now 256 KB.
</li></ul>
<b>Bugfixes:</b>
<ul><li>Creating a table from GROUP_CONCAT didn''t always work.
</li><li>CSV: Using an empty field delimiter didn''t work.
</li><li>Nested temporary views with parameters didn''t always work.
</li><li>Cluster mode: could not connect if only one server was running.
</li><li>ARRAY values are now sorted as in PostgreSQL.
</li><li>The console did not display multiple spaces correctly.
</li><li>Duplicate column names were not detected when renaming columns.
</li><li>The H2 Console now also supports -ifExists.
</li><li>Changing a user with a schema made the schema inaccessible.
</li><li>Referential integrity checks didn''t lock the referenced table.
</li><li>Now changing MVCC too late throws an Exception.
</li></ul>
For future plans, see the ''Roadmap'' page at
http://groups.google.com/group/h2-database/web/roadmap
');
INSERT INTO ITEM VALUES(31,
'New version available: 1.0.61 (2007-11-10)', '2007-11-10 12:00:00',
'A new version of H2 is available for <a href="http://www.h2database.com">download</a>.
......
/*
* Copyright 2004-2007 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.h2.test.trace;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
/**
* Represents a statement (a single line in the log file).
*
* @author Thomas Mueller
*
*/
class Statement {
private Player player;
private boolean assignment;
private String assignClass;
private String assignVariable;
private boolean staticCall;
private String staticCallClass;
private String objectName;
private Object object;
private String methodName;
private Arg[] args;
private Class[] parameterTypes;
private Object[] parameters;
private Method method;
private Class returnClass;
private Object returnObject;
Statement(Player player) {
this.player = player;
}
private Method findMethod(Class clazz) throws Exception {
if ((clazz.getModifiers() & Modifier.PUBLIC) == 0) {
// http://forum.java.sun.com/thread.jspa?threadID=704100&messageID=4084720
// bug 4071957
Class[] interfaces = clazz.getInterfaces();
for (int i = 0; i < interfaces.length; i++) {
Class c = interfaces[i];
if (c.getName().startsWith("javax.")) {
try {
return c.getMethod(methodName, parameterTypes);
} catch (Exception e) {
// TODO this is slow, but a workaround for a JVM bug
}
}
}
}
try {
return clazz.getMethod(methodName, parameterTypes);
} catch (NoSuchMethodException e) {
Method[] methods = clazz.getMethods();
methods:
for (int i = 0; i < methods.length; i++) {
Method m = methods[i];
if (methodName.equals(m.getName())) {
Class[] argClasses = m.getParameterTypes();
for (int j = 0; j < args.length; j++) {
if (!argClasses[j].isAssignableFrom(args[j].getValueClass())) {
continue methods;
}
}
return m;
}
}
}
throw new Error("Method with args not found: " + clazz.getName() + "."
+ methodName + " args: " + args.length);
}
void execute() throws Exception {
if (object == player) {
// there was an exception previously
player.log("> " + assignVariable + " not set");
if (assignment) {
player.assign(assignVariable, player);
}
return;
}
Class clazz;
if (staticCall) {
if (staticCallClass == null || staticCallClass.length() == 0) {
player.log("?class? " + staticCallClass);
}
clazz = Player.getClass(staticCallClass);
} else {
clazz = object.getClass();
}
parameterTypes = new Class[args.length];
parameters = new Object[args.length];
for (int i = 0; i < args.length; i++) {
Arg arg = args[i];
arg.execute();
parameterTypes[i] = arg.getValueClass();
parameters[i] = arg.getValue();
}
method = findMethod(clazz);
returnClass = method.getReturnType();
try {
Object obj = method.invoke(object, parameters);
if (assignment) {
player.assign(assignVariable, obj);
}
returnObject = obj;
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
Throwable t = e.getTargetException();
player.log("> " + t.toString());
if (assignment) {
player.assign(assignVariable, player);
}
}
}
public String toString() {
StringBuffer buff = new StringBuffer();
if (assignment) {
buff.append(assignClass);
buff.append(' ');
buff.append(assignVariable);
buff.append('=');
}
if (staticCall) {
buff.append(staticCallClass);
} else {
buff.append(objectName);
}
buff.append('.');
buff.append(methodName);
buff.append('(');
for (int i = 0; args != null && i < args.length; i++) {
if (i > 0) {
buff.append(", ");
}
buff.append(args[i].toString());
}
buff.append(");");
return buff.toString();
}
Class getReturnClass() {
return returnClass;
}
Object getReturnObject() {
return returnObject;
}
void setAssign(String className, String variableName) {
this.assignment = true;
this.assignClass = className;
this.assignVariable = variableName;
}
void setStaticCall(String className) {
this.staticCall = true;
this.staticCallClass = className;
}
void setMethodCall(String objectName, Object object, String methodName) {
this.objectName = objectName;
this.object = object;
this.methodName = methodName;
}
public void setArgs(ArrayList list) {
args = new Arg[list.size()];
list.toArray(args);
}
}
/*
* Copyright 2004-2007 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.h2.test.trace;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
/**
* Represents a statement (a single line in the log file).
*
* @author Thomas Mueller
*
*/
class Statement {
private Player player;
private boolean assignment;
private String assignClass;
private String assignVariable;
private boolean staticCall;
private String staticCallClass;
private String objectName;
private Object object;
private String methodName;
private Arg[] args;
private Class[] parameterTypes;
private Object[] parameters;
private Method method;
private Class returnClass;
private Object returnObject;
Statement(Player player) {
this.player = player;
}
private Method findMethod(Class clazz) throws Exception {
if ((clazz.getModifiers() & Modifier.PUBLIC) == 0) {
// http://forum.java.sun.com/thread.jspa?threadID=704100&messageID=4084720
// bug 4071957
Class[] interfaces = clazz.getInterfaces();
for (int i = 0; i < interfaces.length; i++) {
Class c = interfaces[i];
if (c.getName().startsWith("javax.")) {
try {
return c.getMethod(methodName, parameterTypes);
} catch (Exception e) {
// TODO this is slow, but a workaround for a JVM bug
}
}
}
}
try {
return clazz.getMethod(methodName, parameterTypes);
} catch (NoSuchMethodException e) {
Method[] methods = clazz.getMethods();
methods:
for (int i = 0; i < methods.length; i++) {
Method m = methods[i];
if (methodName.equals(m.getName())) {
Class[] argClasses = m.getParameterTypes();
for (int j = 0; j < args.length; j++) {
if (!argClasses[j].isAssignableFrom(args[j].getValueClass())) {
continue methods;
}
}
return m;
}
}
}
throw new Error("Method with args not found: " + clazz.getName() + "."
+ methodName + " args: " + args.length);
}
void execute() throws Exception {
if (object == player) {
// there was an exception previously
player.log("> " + assignVariable + " not set");
if (assignment) {
player.assign(assignVariable, player);
}
return;
}
Class clazz;
if (staticCall) {
if (staticCallClass == null || staticCallClass.length() == 0) {
player.log("?class? " + staticCallClass);
}
clazz = Player.getClass(staticCallClass);
} else {
clazz = object.getClass();
}
parameterTypes = new Class[args.length];
parameters = new Object[args.length];
for (int i = 0; i < args.length; i++) {
Arg arg = args[i];
arg.execute();
parameterTypes[i] = arg.getValueClass();
parameters[i] = arg.getValue();
}
method = findMethod(clazz);
returnClass = method.getReturnType();
try {
Object obj = method.invoke(object, parameters);
if (assignment) {
player.assign(assignVariable, obj);
}
returnObject = obj;
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
Throwable t = e.getTargetException();
player.log("> " + t.toString());
if (assignment) {
player.assign(assignVariable, player);
}
}
}
public String toString() {
StringBuffer buff = new StringBuffer();
if (assignment) {
buff.append(assignClass);
buff.append(' ');
buff.append(assignVariable);
buff.append('=');
}
if (staticCall) {
buff.append(staticCallClass);
} else {
buff.append(objectName);
}
buff.append('.');
buff.append(methodName);
buff.append('(');
for (int i = 0; args != null && i < args.length; i++) {
if (i > 0) {
buff.append(", ");
}
buff.append(args[i].toString());
}
buff.append(");");
return buff.toString();
}
Class getReturnClass() {
return returnClass;
}
Object getReturnObject() {
return returnObject;
}
void setAssign(String className, String variableName) {
this.assignment = true;
this.assignClass = className;
this.assignVariable = variableName;
}
void setStaticCall(String className) {
this.staticCall = true;
this.staticCallClass = className;
}
void setMethodCall(String objectName, Object object, String methodName) {
this.objectName = objectName;
this.object = object;
this.methodName = methodName;
}
public void setArgs(ArrayList list) {
args = new Arg[list.size()];
list.toArray(args);
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论