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

--no commit message

--no commit message
上级 e9852b45
...@@ -1096,6 +1096,7 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch. ...@@ -1096,6 +1096,7 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch.
</li><li>Support multiple directories (on different hard drives) for the same database </li><li>Support multiple directories (on different hard drives) for the same database
</li><li>Server protocol: use challenge response authentication, but client sends hash(user+password) encrypted with response </li><li>Server protocol: use challenge response authentication, but client sends hash(user+password) encrypted with response
</li><li>Support EXEC[UTE] (doesn't return a result set, compatible to MS SQL Server) </li><li>Support EXEC[UTE] (doesn't return a result set, compatible to MS SQL Server)
</li><li>GROUP BY and DISTINCT: support large groups (buffer to disk), do not keep large sets in memory
</li></ul> </li></ul>
<h3>Not Planned</h3> <h3>Not Planned</h3>
......
h2/src/docsrc/html/images/download.png

806 Bytes | W: | H:

h2/src/docsrc/html/images/download.png

745 Bytes | W: | H:

h2/src/docsrc/html/images/download.png
h2/src/docsrc/html/images/download.png
h2/src/docsrc/html/images/download.png
h2/src/docsrc/html/images/download.png
  • 2-up
  • Swipe
  • Onion skin
h2/src/docsrc/html/images/mail-support.png

768 Bytes | W: | H:

h2/src/docsrc/html/images/mail-support.png

756 Bytes | W: | H:

h2/src/docsrc/html/images/mail-support.png
h2/src/docsrc/html/images/mail-support.png
h2/src/docsrc/html/images/mail-support.png
h2/src/docsrc/html/images/mail-support.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -181,13 +181,6 @@ public class CommandRemote implements CommandInterface { ...@@ -181,13 +181,6 @@ public class CommandRemote implements CommandInterface {
} }
} }
// public void finalize() {
// if(!Constants.RUN_FINALIZE) {
// return;
// }
// close();
// }
public void cancel() { public void cancel() {
// TODO server: support cancel // TODO server: support cancel
} }
......
...@@ -67,8 +67,8 @@ package org.h2.engine; ...@@ -67,8 +67,8 @@ package org.h2.engine;
*/ */
public class Constants { public class Constants {
public static final int BUILD_ID = 50; public static final int BUILD_ID = 51;
private static final String BUILD = "2007-06-17"; private static final String BUILD = "2007-06-25";
public static final int VERSION_MAJOR = 1; public static final int VERSION_MAJOR = 1;
public static final int VERSION_MINOR = 0; public static final int VERSION_MINOR = 0;
...@@ -247,6 +247,7 @@ public class Constants { ...@@ -247,6 +247,7 @@ public class Constants {
public static boolean LOB_CLOSE_BETWEEN_READS = getBooleanSetting("h2.lobCloseBetweenReads", false); public static boolean LOB_CLOSE_BETWEEN_READS = getBooleanSetting("h2.lobCloseBetweenReads", false);
public static boolean INDEX_OLD = getBooleanSetting("h2.indexOld", false); public static boolean INDEX_OLD = getBooleanSetting("h2.indexOld", false);
public static final boolean INDEX_LOOKUP_NEW = getBooleanSetting("h2.indexLookupNew", true); public static final boolean INDEX_LOOKUP_NEW = getBooleanSetting("h2.indexLookupNew", true);
public static final boolean TRACE_IO = getBooleanSetting("h2.traceIO", false);
public static boolean getBooleanSetting(String name, boolean defaultValue) { public static boolean getBooleanSetting(String name, boolean defaultValue) {
String s = System.getProperty(name); String s = System.getProperty(name);
......
...@@ -139,7 +139,6 @@ Serializable, Referenceable { ...@@ -139,7 +139,6 @@ Serializable, Referenceable {
this.user = user; this.user = user;
} }
public Reference getReference() throws NamingException { public Reference getReference() throws NamingException {
debugCodeCall("getReference"); debugCodeCall("getReference");
String factoryClassName = JdbcDataSourceFactory.class.getName(); String factoryClassName = JdbcDataSourceFactory.class.getName();
......
...@@ -192,13 +192,6 @@ public class ResultRemote implements ResultInterface { ...@@ -192,13 +192,6 @@ public class ResultRemote implements ResultInterface {
} }
} }
// public void finalize() {
// if(!Constants.RUN_FINALIZE) {
// return;
// }
// close();
// }
private Value[] fetchRow(boolean sendFetch) throws SQLException { private Value[] fetchRow(boolean sendFetch) throws SQLException {
synchronized (session) { synchronized (session) {
session.checkClosed(); session.checkClosed();
......
...@@ -137,6 +137,7 @@ public class FileStore { ...@@ -137,6 +137,7 @@ public class FileStore {
public void close() throws IOException { public void close() throws IOException {
if(file != null) { if(file != null) {
try { try {
trace("close", name, file);
file.close(); file.close();
} finally { } finally {
file = null; file = null;
...@@ -145,12 +146,10 @@ public class FileStore { ...@@ -145,12 +146,10 @@ public class FileStore {
} }
public void closeSilently() { public void closeSilently() {
if(file != null) {
try { try {
file.close(); close();
} catch(IOException e) { } catch(IOException e) {
file = null; // ignore
}
} }
} }
...@@ -307,6 +306,7 @@ public class FileStore { ...@@ -307,6 +306,7 @@ public class FileStore {
public void sync() { public void sync() {
try { try {
file.getFD().sync(); file.getFD().sync();
} catch(IOException e) { } catch(IOException e) {
// TODO log exception // TODO log exception
...@@ -338,4 +338,10 @@ public class FileStore { ...@@ -338,4 +338,10 @@ public class FileStore {
} }
} }
private static void trace(String method, String fileName, Object o) {
if(Constants.TRACE_IO) {
System.out.println("FileStore." + method + " " + fileName + " " + o);
}
}
} }
...@@ -36,7 +36,9 @@ public class FileUtils { ...@@ -36,7 +36,9 @@ public class FileUtils {
public static RandomAccessFile openRandomAccessFile(String fileName, String mode) throws IOException { public static RandomAccessFile openRandomAccessFile(String fileName, String mode) throws IOException {
fileName = translateFileName(fileName); fileName = translateFileName(fileName);
try { try {
return new RandomAccessFile(fileName, mode); RandomAccessFile file = new RandomAccessFile(fileName, mode);
trace("openRandomAccessFile", fileName, file);
return file;
} catch(IOException e) { } catch(IOException e) {
freeMemoryAndFinalize(); freeMemoryAndFinalize();
return new RandomAccessFile(fileName, mode); return new RandomAccessFile(fileName, mode);
...@@ -45,6 +47,7 @@ public class FileUtils { ...@@ -45,6 +47,7 @@ public class FileUtils {
public static void setLength(RandomAccessFile file, long newLength) throws IOException { public static void setLength(RandomAccessFile file, long newLength) throws IOException {
try { try {
trace("setLength", null, file);
file.setLength(newLength); file.setLength(newLength);
} catch(IOException e) { } catch(IOException e) {
long length = file.length(); long length = file.length();
...@@ -88,7 +91,9 @@ public class FileUtils { ...@@ -88,7 +91,9 @@ public class FileUtils {
public static FileInputStream openFileInputStream(String fileName) throws IOException { public static FileInputStream openFileInputStream(String fileName) throws IOException {
fileName = translateFileName(fileName); fileName = translateFileName(fileName);
return new FileInputStream(fileName); FileInputStream in = new FileInputStream(fileName);
trace("openFileInputStream", fileName, in);
return in;
} }
public static FileOutputStream openFileOutputStream(String fileName) throws IOException, SQLException { public static FileOutputStream openFileOutputStream(String fileName) throws IOException, SQLException {
...@@ -96,7 +101,9 @@ public class FileUtils { ...@@ -96,7 +101,9 @@ public class FileUtils {
try { try {
File file = new File(fileName); File file = new File(fileName);
FileUtils.createDirs(file.getAbsolutePath()); FileUtils.createDirs(file.getAbsolutePath());
return new FileOutputStream(fileName); FileOutputStream out = new FileOutputStream(fileName);
trace("openFileOutputStream", fileName, out);
return out;
} catch(IOException e) { } catch(IOException e) {
freeMemoryAndFinalize(); freeMemoryAndFinalize();
return new FileOutputStream(fileName); return new FileOutputStream(fileName);
...@@ -104,6 +111,7 @@ public class FileUtils { ...@@ -104,6 +111,7 @@ public class FileUtils {
} }
private static void freeMemoryAndFinalize() { private static void freeMemoryAndFinalize() {
trace("freeMemoryAndFinalize", null, null);
Runtime rt = Runtime.getRuntime(); Runtime rt = Runtime.getRuntime();
long mem = rt.freeMemory(); long mem = rt.freeMemory();
for(int i=0; i<16; i++) { for(int i=0; i<16; i++) {
...@@ -138,6 +146,7 @@ public class FileUtils { ...@@ -138,6 +146,7 @@ public class FileUtils {
throw Message.getSQLException(Message.FILE_RENAME_FAILED_2, new String[]{oldName, newName + " (exists)"}, null); throw Message.getSQLException(Message.FILE_RENAME_FAILED_2, new String[]{oldName, newName + " (exists)"}, null);
} }
for(int i=0; i<Constants.MAX_FILE_RETRY; i++) { for(int i=0; i<Constants.MAX_FILE_RETRY; i++) {
trace("rename", oldName + " >" + newName, null);
boolean ok = oldFile.renameTo(newFile); boolean ok = oldFile.renameTo(newFile);
if(ok) { if(ok) {
return; return;
...@@ -232,6 +241,7 @@ public class FileUtils { ...@@ -232,6 +241,7 @@ public class FileUtils {
File file = new File(fileName); File file = new File(fileName);
if(file.exists()) { if(file.exists()) {
for(int i=0; i<Constants.MAX_FILE_RETRY; i++) { for(int i=0; i<Constants.MAX_FILE_RETRY; i++) {
trace("delete", fileName, null);
boolean ok = file.delete(); boolean ok = file.delete();
if(ok) { if(ok) {
return; return;
...@@ -295,6 +305,7 @@ public class FileUtils { ...@@ -295,6 +305,7 @@ public class FileUtils {
memoryFiles.remove(fileName); memoryFiles.remove(fileName);
return; return;
} }
trace("tryDelete", fileName, null);
new File(fileName).delete(); new File(fileName).delete();
} }
...@@ -482,4 +493,10 @@ public class FileUtils { ...@@ -482,4 +493,10 @@ public class FileUtils {
return new File(fileName).canWrite(); return new File(fileName).canWrite();
} }
private static void trace(String method, String fileName, Object o) {
if(Constants.TRACE_IO) {
System.out.println("FileUtils." + method + " " + fileName + " " + o);
}
}
} }
...@@ -27,6 +27,7 @@ public class IOUtils { ...@@ -27,6 +27,7 @@ public class IOUtils {
public static void closeSilently(OutputStream out) { public static void closeSilently(OutputStream out) {
if(out != null) { if(out != null) {
try { try {
trace("closeSilently", null, out);
out.close(); out.close();
} catch(IOException e) { } catch(IOException e) {
// ignore // ignore
...@@ -97,6 +98,7 @@ public class IOUtils { ...@@ -97,6 +98,7 @@ public class IOUtils {
public static void closeSilently(InputStream in) { public static void closeSilently(InputStream in) {
if(in != null) { if(in != null) {
try { try {
trace("closeSilently", null, in);
in.close(); in.close();
} catch(IOException e) { } catch(IOException e) {
// ignore // ignore
...@@ -241,4 +243,10 @@ public class IOUtils { ...@@ -241,4 +243,10 @@ public class IOUtils {
} }
} }
private static void trace(String method, String fileName, Object o) {
if(Constants.TRACE_IO) {
System.out.println("IOUtils." + method + " " + fileName + " " + o);
}
}
} }
...@@ -93,11 +93,42 @@ java -Xmx512m -Xrunhprof:cpu=samples,depth=8 org.h2.tools.RunScript -url jdbc:h2 ...@@ -93,11 +93,42 @@ java -Xmx512m -Xrunhprof:cpu=samples,depth=8 org.h2.tools.RunScript -url jdbc:h2
test.printSystem(); test.printSystem();
/* /*
runscript from 'C:\download\backup.sql';
alter table download_link add html_ltarget_ord INTEGER(10) default 0;
alter table navigation_link add html_ltarget_ord INTEGER(10) default 0;
alter table web_link add html_ltarget_ord INTEGER(10) default 0;
ALTER TABLE navigation_page_content DROP COLUMN parent_type_id;
ALTER TABLE entity_info DROP COLUMN parent_type_id;
ALTER TABLE navigation_point_content DROP COLUMN parent_type_id;
ALTER TABLE paragraph_proxy DROP COLUMN parent_type_id;
ALTER TABLE patch DROP COLUMN parent_type_id;
ALTER TABLE page_content DROP COLUMN parent_type_id;
ALTER TABLE image_gallery_image_usage_ref DROP COLUMN ref_image_gallery;
ALTER TABLE navigation_page_content_reference DROP COLUMN ref_element_provider;
ALTER TABLE paragraph_proxy DROP COLUMN ref_page_content;
alter table navigation_page_content_reference add contained BOOLEAN(1) default false;
update navigation_page_content_reference set contained=true where state=7;
alter table navigation_page_content add contained BOOLEAN(1) default false;
update navigation_page_content set contained=true where state=7;
alter table navigation_point_content add contained BOOLEAN(1) default false;
update navigation_point_content set contained=true where state=7;
alter table weblica_link add contained BOOLEAN(1) default false;
update weblica_link set contained=true where state=7;
alter table image_usage add contained BOOLEAN(1) default false;
update image_usage set contained=true where state=7;
alter table paragraph_proxy add contained BOOLEAN(1) default false;
make sure INDEX_LOOKUP_NEW = is true by default. make sure INDEX_LOOKUP_NEW = is true by default.
Test Console (batch, javaw, different platforms) Test Console (batch, javaw, different platforms)
backup.sql / lob file problem
Change documentation and default database for H2 Console: jdbc:h2:~/test Change documentation and default database for H2 Console: jdbc:h2:~/test
testHalt testHalt
...@@ -158,9 +189,7 @@ support translated exceptions (english + translated) ...@@ -158,9 +189,7 @@ support translated exceptions (english + translated)
select * from H2.PUBLIC.ORDERS select * from H2.PUBLIC.ORDERS
Wre es nicht besser, unabhngig von DB_CLOSE_DELAY eine Datenbank offen keep db open (independent of DB_CLOSE_DELAY) while a PooledConnections exists.
zu halten, solange dafr offene PooledConnections vorhanden sind?
*/ */
......
...@@ -459,6 +459,8 @@ netscape mywebpage javaplayer fuse davidlbarron helps player appfuse awt ...@@ -459,6 +459,8 @@ netscape mywebpage javaplayer fuse davidlbarron helps player appfuse awt
gridwidth editable pressed entered awt east toolkit insets exited grid mouse west resizable popup focusable bag anchor gridwidth editable pressed entered awt east toolkit insets exited grid mouse west resizable popup focusable bag anchor
headless headless
polish javaee resp xsi instances tomek realm xsd appended auth polski polish javaee resp xsi instances tomek realm xsd appended auth polski
signsoft intellibo jdo intelli middleware ute war sends snippet
gallery ord javaw weblica ltarget
### check those again: ### check those again:
populate slowly xacon inser maxbqualsize counter regards attaching official xatest populate slowly xacon inser maxbqualsize counter regards attaching official xatest
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论