提交 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.
</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>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>
<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 {
}
}
// public void finalize() {
// if(!Constants.RUN_FINALIZE) {
// return;
// }
// close();
// }
public void cancel() {
// TODO server: support cancel
}
......
......@@ -67,8 +67,8 @@ package org.h2.engine;
*/
public class Constants {
public static final int BUILD_ID = 50;
private static final String BUILD = "2007-06-17";
public static final int BUILD_ID = 51;
private static final String BUILD = "2007-06-25";
public static final int VERSION_MAJOR = 1;
public static final int VERSION_MINOR = 0;
......@@ -247,6 +247,7 @@ public class Constants {
public static boolean LOB_CLOSE_BETWEEN_READS = getBooleanSetting("h2.lobCloseBetweenReads", 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 TRACE_IO = getBooleanSetting("h2.traceIO", false);
public static boolean getBooleanSetting(String name, boolean defaultValue) {
String s = System.getProperty(name);
......
......@@ -139,7 +139,6 @@ Serializable, Referenceable {
this.user = user;
}
public Reference getReference() throws NamingException {
debugCodeCall("getReference");
String factoryClassName = JdbcDataSourceFactory.class.getName();
......
......@@ -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 {
synchronized (session) {
session.checkClosed();
......
......@@ -137,6 +137,7 @@ public class FileStore {
public void close() throws IOException {
if(file != null) {
try {
trace("close", name, file);
file.close();
} finally {
file = null;
......@@ -145,12 +146,10 @@ public class FileStore {
}
public void closeSilently() {
if(file != null) {
try {
file.close();
close();
} catch(IOException e) {
file = null;
}
// ignore
}
}
......@@ -307,6 +306,7 @@ public class FileStore {
public void sync() {
try {
file.getFD().sync();
} catch(IOException e) {
// TODO log exception
......@@ -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 {
public static RandomAccessFile openRandomAccessFile(String fileName, String mode) throws IOException {
fileName = translateFileName(fileName);
try {
return new RandomAccessFile(fileName, mode);
RandomAccessFile file = new RandomAccessFile(fileName, mode);
trace("openRandomAccessFile", fileName, file);
return file;
} catch(IOException e) {
freeMemoryAndFinalize();
return new RandomAccessFile(fileName, mode);
......@@ -45,6 +47,7 @@ public class FileUtils {
public static void setLength(RandomAccessFile file, long newLength) throws IOException {
try {
trace("setLength", null, file);
file.setLength(newLength);
} catch(IOException e) {
long length = file.length();
......@@ -88,7 +91,9 @@ public class FileUtils {
public static FileInputStream openFileInputStream(String fileName) throws IOException {
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 {
......@@ -96,7 +101,9 @@ public class FileUtils {
try {
File file = new File(fileName);
FileUtils.createDirs(file.getAbsolutePath());
return new FileOutputStream(fileName);
FileOutputStream out = new FileOutputStream(fileName);
trace("openFileOutputStream", fileName, out);
return out;
} catch(IOException e) {
freeMemoryAndFinalize();
return new FileOutputStream(fileName);
......@@ -104,6 +111,7 @@ public class FileUtils {
}
private static void freeMemoryAndFinalize() {
trace("freeMemoryAndFinalize", null, null);
Runtime rt = Runtime.getRuntime();
long mem = rt.freeMemory();
for(int i=0; i<16; i++) {
......@@ -138,6 +146,7 @@ public class FileUtils {
throw Message.getSQLException(Message.FILE_RENAME_FAILED_2, new String[]{oldName, newName + " (exists)"}, null);
}
for(int i=0; i<Constants.MAX_FILE_RETRY; i++) {
trace("rename", oldName + " >" + newName, null);
boolean ok = oldFile.renameTo(newFile);
if(ok) {
return;
......@@ -232,6 +241,7 @@ public class FileUtils {
File file = new File(fileName);
if(file.exists()) {
for(int i=0; i<Constants.MAX_FILE_RETRY; i++) {
trace("delete", fileName, null);
boolean ok = file.delete();
if(ok) {
return;
......@@ -295,6 +305,7 @@ public class FileUtils {
memoryFiles.remove(fileName);
return;
}
trace("tryDelete", fileName, null);
new File(fileName).delete();
}
......@@ -482,4 +493,10 @@ public class FileUtils {
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 {
public static void closeSilently(OutputStream out) {
if(out != null) {
try {
trace("closeSilently", null, out);
out.close();
} catch(IOException e) {
// ignore
......@@ -97,6 +98,7 @@ public class IOUtils {
public static void closeSilently(InputStream in) {
if(in != null) {
try {
trace("closeSilently", null, in);
in.close();
} catch(IOException e) {
// ignore
......@@ -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
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.
Test Console (batch, javaw, different platforms)
backup.sql / lob file problem
Change documentation and default database for H2 Console: jdbc:h2:~/test
testHalt
......@@ -158,9 +189,7 @@ support translated exceptions (english + translated)
select * from H2.PUBLIC.ORDERS
Wre es nicht besser, unabhngig von DB_CLOSE_DELAY eine Datenbank offen
zu halten, solange dafr offene PooledConnections vorhanden sind?
keep db open (independent of DB_CLOSE_DELAY) while a PooledConnections exists.
*/
......
......@@ -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
headless
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:
populate slowly xacon inser maxbqualsize counter regards attaching official xatest
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论