提交 5eff30c5 authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 5d7fc7b2
...@@ -15,7 +15,23 @@ Change Log ...@@ -15,7 +15,23 @@ Change Log
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul> <ul>
<li>The performance of text comparison has been improved when using locale sensitive </li><li>When using multi-version concurrency (MVCC=TRUE), duplicate rows could appear in the result set when running queries
with uncommitted changes in the same session.
</li><li>H2 Console: remote connections were very slow because getHostName/getRemoteHost was used.
Fixed (now using getHostAddress/getRemoteAddr.
</li><li>H2 Console: on Linux, Firefox, Konqueror, or Opera (in this order) are now started if available.
This has been tested on Ubuntu.
</li><li>H2 Console: the start window works better with IKVM
</li><li>H2 Console: improved compatibility with Safari (Safari requires keep-alive)
</li><li>Random: the process didn't stop if generating the random seed using the standard
way (SecureRandom.generateSeed) was very slow. Now using a daemon thread
to avoid this problem.
</li><li>SELECT UNION with a different number of ORDER BY columns did throw an ArrayIndexOutOfBoundsException.
</li><li>When using view, the precision of column was changed to the default scale for some data types.
</li><li>CSVWRITE now supports a 'null string' that is used for parsing and writing NULL.
</li><li>Some long running queries could not be cancelled.
</li><li>Queries with many outer join tables were very slow. Fixed.
</li><li>The performance of text comparison has been improved when using locale sensitive
string comparison (SET COLLATOR). Now CollationKey is used with a LRU cache. string comparison (SET COLLATOR). Now CollationKey is used with a LRU cache.
The default cache size is 10000, and can be changed using the system property The default cache size is 10000, and can be changed using the system property
h2.collatorCacheSize. Use 0 to disable the cache. h2.collatorCacheSize. Use 0 to disable the cache.
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2008 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
Initial Developer: H2 Group
-->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
H2 In Use and Links
</title><link rel="stylesheet" type="text/css" href="stylesheet.css" />
<script type="text/javascript" src="navigation.js"></script>
</head><body onload="frameMe();">
<table class="content"><tr class="content"><td class="content"><div class="contentDiv">
<h1>H2 In Use and Links</h1>
<h2>Books</h2><p>
<a href="http://code.google.com/p/seaminaction/wiki/GettingStarted%20">Seam In Action</a>
<h2>Extensions</h2>
<a href="http://geosysin.iict.ch/irstv-trac/wiki/H2spatial/Download">
Spatial capabilities</a><br />
<h2>Blogs</h2>
<a href="http://www.bluedevel.com/blog/?p=12">
Testing your JDBC data access layer with DBUnit and H2 (2007-09-18)</a><br />
<a href="http://www.encorewiki.org/display/encore/Open+Source+Databases+Comparison">
Open Source Databases Comparison (2007-09-11)</a><br />
<a href="http://thecodist.com/fiche/thecodist/article/the-open-source-frameworks-i-use">
The Codist: The Open Source Frameworks I Use (2007-07-23)</a><br />
<a href="http://thecodist.com/fiche/thecodist/article/sql-injections-how-not-to-get-stuck">
The Codist: SQL Injections: How Not To Get Stuck (2007-05-08)</a><br />
<a href="http://manichord.com/blog/2007/05/helma-h2-to-easy.html">
One Man Band: (Helma + H2) == "to easy" (2007-03-11)</a><br />
<a href="http://blogs.sun.com/coldrick/entry/new_version_of_h2_database">
David Coldrick's Weblog: New Version of H2 Database Released (2007-01-06)</a><br />
<a href="http://thecodist.com/fiche/thecodist/article/write-your-own-database-again-an-interview-with-the-author-of-h2-thomas-mueller">
The Codist: Write Your Own Database, Again (2006-11-13)</a><br />
<h2>Project Pages</h2>
<a href="http://www.ohloh.net/projects/3924?p=H2+Database+Engine">
Ohloh</a><br />
<a href="http://freshmeat.net/projects/h2">
Freshmeat Project Page</a><br />
<a href="http://en.wikipedia.org/wiki/H2_%28DBMS%29">
Wikipedia</a><br />
<a href="http://oszone.org/project/1749">
OSZone</a><br />
<a href="http://java-source.net/open-source/database-engines/h2">
Java Source Net</a><br />
<a href="http://packman.links2linux.org/package/h2">
Linux Package Manager</a><br />
<h2>Products and Projects</h2>
<p><a href="http://cayenne.apache.org/">Apache Cayenne</a><br />
Open source persistence framework providing object-relational mapping (ORM) and remoting services.
</p>
<p><a href="http://jackrabbit.apache.org">Apache Jackrabbit</a><br />
Open source implementation of the Java Content Repository API (JCR).
</p>
<p><a href="http://incubator.apache.org/openjpa">Apache OpenJPA</a><br />
Open source implementation of the Java Persistence API (JPA).
</p>
<p><a href="http://appfuse.org">AppFuse</a><br />
Helps building web applications.
</p>
<p><a href="http://wiki.blojsom.com">Blojsom</a><br />
Java-based multi-blog, multi-user software package (Mac OS X Weblog Server)
</p>
<p><a href="http://bmarks-portlet.sourceforge.net">Bookmarks Portlet</a><br />
JSR168 compliant bookmarks management portlet application.
</p>
<p><a href="http://www.claros.org">Claros inTouch</a><br />
Ajax communication suite with mail, addresses, notes, IM, and rss reader.
</p>
<p><a href="http://www.dbsolo.com">DB Solo</a><br />
SQL query tool.
</p>
<p><a href="http://www.minq.se/products/dbvis">DbVisualizer</a><br />
Database tool.
</p>
<p><a href="http://executequery.org">Execute Query</a><br />
Database utility written in Java.
</p>
<p><a href="http://www.goldenstudios.or.id">Golden T Studios</a><br />
Fun-to-play games with a simple interface.</p>
<p><a href="http://ha-jdbc.sourceforge.net/">HA-JDBC</a><br />
High-Availability JDBC: A JDBC proxy that provides light-weight, transparent, fault tolerant clustering capability to any underlying JDBC driver.
</p>
<p><a href="http://hibernate.org">Hibernate</a><br />
Relational persistence for idiomatic Java (O-R mapping tool).
</p>
<p><a href="http://www.willuhn.de/projects/hibiscus/">Hibicius</a><br />
Online Banking Client for the HBCI protocol
</p>
<p><a href="http://geosysin.iict.ch/irstv-trac/wiki/H2spatial/Why">H2 Spatial</a><br />
A project to add spatial functions to H2 database.
</p>
<p><a href="http://jamwiki.org">JAMWiki</a><br />
Java-based Wiki engine.
</p>
<p><a href="http://dev.orf.at/trac/jala">Jala</a><br />
Open source collection of JavaScript modules
</p>
<p><a href="http://mywebpage.netscape.com/davidlbarron/javaplayer.html">JavaPlayer</a><br />
Pure Java MP3 player.
</p>
<p><a href="http://jmatter.org/">JMatter</a><br />
Framework for constructing workgroup business applications based on the Naked Objects Architectural Pattern.
</p>
<p><a href="http://www.jpox.org">JPOX</a><br />
Java persistent objects.
</p>
<p><a href="http://code.google.com/p/liftweb/">Liftweb</a><br />
A Scala-based, secure, developer friendly web framework
</p>
<p><a href="http://liquibase.sourceforge.net">LiquiBase</a><br />
A tool to manage database changes and refactorings.
</p>
<p><a href="http://luntbuild.javaforge.com">Luntbuild</a><br />
Build automation and management tool.</p>
<p><a href="http://jenkov.com/mrpersister/index.html">Mr. Persister</a><br />
Simple, small and fast object relational mapping.
</p>
<p><a href="http://myna.emptybrain.info">Myna Application Server</a><br />
Java web app that provides dynamic web content and Java libraries access from JavaScript.
</p>
<p><a href="http://docs.codewave.de/mytunesrss3/">MyTunesRss</a><br />
MyTunesRSS lets you listen to your music wherever you are.
</p>
<p><a href="http://ncgc.nih.gov/pub/openhts/">NCGC CurveFit</a><br />
From: NIH Chemical Genomics Center, National Institutes of Health, USA.
An open source application in the life sciences research field. This
application handles chemical structures and biological responses of
thousands of compounds with the potential to handle million+ compounds.
It utilizes an embedded H2 database to enable flexible query/retrieval
of all data including advanced chemical substructure and similarity
searching. The application highlights an automated curve fitting and
classification algorithm that outperforms commercial packages in the
field. Commercial alternatives are typically small desktop software
that handle a few dose response curves at a time. A couple of
commercial packages that do handle several thousand curves are very
expensive tools (&gt;60k USD) that require manual curation of analysis
by the user; require a license to Oracle; lack advanced
query/retrieval; and the ability to handle chemical structures.
</p>
<p><a href="http://www.orionserver.com/">Orion</a><br />
J2EE Application Server.
</p>
<p><a href="http://www.polepos.org">PolePosition</a><br />
Open source database benchmark.
</p>
<p><a href="http://scriptella.javaforge.com">Scriptella</a><br />
ETL (Extract-Transform-Load) and script execution tool.
</p>
<p><a href="http://www.seasar.org">Sesar</a><br />
Dependency Injection Container with Aspect Oriented Programming
</p>
<p><a href="http://semmle.com">SemmleCode</a><br />
Eclipse plugin to help you improve software quality.
</p>
<p><a href="http://www.shellbook.com">Shellbook</a><br />
Desktop publishing application.
</p>
<p><a href="http://www.intellibo.com">Signsoft intelliBO</a><br />
Persistence middleware supporting the JDO specification.
</p>
<p><a href="http://www.smartfoxserver.com/">SmartFoxServer</a><br />
Platform for developing multiuser applications and games with Macromedia Flash.
</p>
<p><a href="http://sqldeveloper.solyp.com/index.html">SQL Developer</a><br />
Universal Database Frontend.
</p>
<p><a href="http://sql-workbench.net">SQL Workbench/J</a><br />
Free DBMS-independent SQL tool.
</p>
<p><a href="http://www.squirrelsql.org">SQuirreL SQL Client</a><br />
Graphical tool to view the structure of a database, browse the data, issue SQL commands etc.
</p>
<p><a href="http://dbcopyplugin.sf.net">SQuirreL DB Copy Plugin</a><br />
Tool to copy data from one database to another.
</p>
<p><a href="http://www.intertec.ch/storybook">StorYBook</a><br />
A summary-based tool for novelist and script writers. It helps to keep the overview over the various traces a story has.
</p>
<p><a href="http://www.streamcruncher.com">StreamCruncher</a><br />
Event (stream) processing kernel.
</p>
<p><a href="http://www.tamava.com">Tamava</a><br />
Newsgroups Reader.
</p>
<p><a href="http://www.gabealbert.info/tunebackup">Tune Backup</a><br />
Easy-to-use backup solution for your iTunes library.
</p>
<p><a href="http://www.webofweb.net">Web of Web</a><br />
Collaborative and realtime interactive media platform for the web.
</p>
<p><a href="http://code.google.com/p/werkzeugkasten/">Werkzeugkasten</a><br />
Minimum Java Toolset.
</p>
<p><a href="http://sourceforge.net/projects/volunteerbase/">Volunteer database</a><br />
A database front end to register volunteers, partnership and donation for a Non Profit organization.
</p>
</div></td></tr></table></body></html>
\ No newline at end of file
...@@ -454,6 +454,7 @@ public class Database implements DataHandler { ...@@ -454,6 +454,7 @@ public class Database implements DataHandler {
deleteOldTempFiles(); deleteOldTempFiles();
log = new LogSystem(this, databaseName, readOnly, accessModeLog); log = new LogSystem(this, databaseName, readOnly, accessModeLog);
openFileData(); openFileData();
log.open();
openFileIndex(); openFileIndex();
log.recover(); log.recover();
fileData.init(); fileData.init();
......
...@@ -52,12 +52,12 @@ public class LogSystem { ...@@ -52,12 +52,12 @@ public class LogSystem {
this.database = database; this.database = database;
this.readOnly = readOnly; this.readOnly = readOnly;
this.accessMode = accessMode; this.accessMode = accessMode;
closed = true;
if (database == null) { if (database == null) {
return; return;
} }
this.fileNamePrefix = fileNamePrefix; this.fileNamePrefix = fileNamePrefix;
rowBuff = DataPage.create(database, Constants.DEFAULT_DATA_PAGE_SIZE); rowBuff = DataPage.create(database, Constants.DEFAULT_DATA_PAGE_SIZE);
loadActiveLogFiles();
} }
public void setMaxLogSize(long maxSize) { public void setMaxLogSize(long maxSize) {
...@@ -225,7 +225,7 @@ public class LogSystem { ...@@ -225,7 +225,7 @@ public class LogSystem {
l.close(deleteOldLogFilesAutomatically && keepFiles == 0); l.close(deleteOldLogFilesAutomatically && keepFiles == 0);
} }
private void loadActiveLogFiles() throws SQLException { public void open() throws SQLException {
String path = FileUtils.getParent(fileNamePrefix); String path = FileUtils.getParent(fileNamePrefix);
String[] list = FileUtils.listFiles(path); String[] list = FileUtils.listFiles(path);
activeLogs = new ObjectArray(); activeLogs = new ObjectArray();
...@@ -238,6 +238,7 @@ public class LogSystem { ...@@ -238,6 +238,7 @@ public class LogSystem {
database.getTrace(Trace.LOG).debug("Error opening log file, header corrupt: "+s, e); database.getTrace(Trace.LOG).debug("Error opening log file, header corrupt: "+s, e);
// this can happen if the system crashes just after creating a new file (before writing the header) // this can happen if the system crashes just after creating a new file (before writing the header)
// rename it, so that it doesn't get in the way the next time // rename it, so that it doesn't get in the way the next time
FileUtils.delete(s + ".corrupt");
FileUtils.rename(s, s + ".corrupt"); FileUtils.rename(s, s + ".corrupt");
} }
if (l != null) { if (l != null) {
...@@ -258,6 +259,7 @@ public class LogSystem { ...@@ -258,6 +259,7 @@ public class LogSystem {
activeLogs.add(l); activeLogs.add(l);
} }
currentLog = (LogFile) activeLogs.get(activeLogs.size() - 1); currentLog = (LogFile) activeLogs.get(activeLogs.size() - 1);
closed = false;
} }
Storage getStorageForRecovery(int id) throws SQLException { Storage getStorageForRecovery(int id) throws SQLException {
......
...@@ -108,8 +108,7 @@ public class DiskFile implements CacheWriter { ...@@ -108,8 +108,7 @@ public class DiskFile implements CacheWriter {
this.cache = new CacheLRU(this, cacheSize); this.cache = new CacheLRU(this, cacheSize);
} }
rowBuff = DataPage.create(database, BLOCK_SIZE); rowBuff = DataPage.create(database, BLOCK_SIZE);
// TODO: the overhead is larger in the log file, so this value is too // TODO: the overhead is larger in the log file, so this value is too high :-(
// high :-(
recordOverhead = 4 * rowBuff.getIntLen() + 1 + rowBuff.getFillerLength(); recordOverhead = 4 * rowBuff.getIntLen() + 1 + rowBuff.getFillerLength();
freeBlock = DataPage.create(database, BLOCK_SIZE); freeBlock = DataPage.create(database, BLOCK_SIZE);
freeBlock.fill(BLOCK_SIZE); freeBlock.fill(BLOCK_SIZE);
......
...@@ -18,6 +18,7 @@ import org.h2.test.db.TestCheckpoint; ...@@ -18,6 +18,7 @@ import org.h2.test.db.TestCheckpoint;
import org.h2.test.db.TestCluster; import org.h2.test.db.TestCluster;
import org.h2.test.db.TestCompatibility; import org.h2.test.db.TestCompatibility;
import org.h2.test.db.TestCsv; import org.h2.test.db.TestCsv;
import org.h2.test.db.TestEncryptedDb;
import org.h2.test.db.TestExclusive; import org.h2.test.db.TestExclusive;
import org.h2.test.db.TestFullText; import org.h2.test.db.TestFullText;
import org.h2.test.db.TestFunctions; import org.h2.test.db.TestFunctions;
...@@ -156,10 +157,18 @@ java org.h2.test.TestAll timer ...@@ -156,10 +157,18 @@ java org.h2.test.TestAll timer
/* /*
C:\temp\db
select.sql
test startbrowser with ubuntu There is now an optimization for SELECT DISTINCT (see http://www.h2database.com/javadoc/org/h2/constant/SysProperties.html#h2.optimizeDistinct) so that the index is used. There are a few conditions:
- It must be as simple as: SELECT DISTINCT <column> FROM <table>
- The column must be indexed
- The selectivity must be quite low, that is, below 20. You need to run ANALYZE or set the selectivity manually.
I will add this to the docs.
remove old in use, links
fix or disable the linear hash index fix or disable the linear hash index
...@@ -173,20 +182,15 @@ ant 'get' for dependencies ...@@ -173,20 +182,15 @@ ant 'get' for dependencies
Add where required // TODO: change in version 1.1 Add where required // TODO: change in version 1.1
History: History:
When using multi-version concurrency (MVCC=TRUE), duplicate rows could appear in the result set when running queries
with uncommitted changes in the same session. I'm trying to use h2database embedded with AES encryption. It all
H2 Console: remote connections were very slow because getHostName/getRemoteHost was used. Fixed (now using getHostAddress/getRemoteAddr. seems to work fine UNLESS the wrong decryption password id specified
H2 Console: on Linux, Firefox is now started if available. This has been tested on Ubuntu. in the connection ( DriverManager.getConnection(url, prop) ). If this
H2 Console: the start window works better with IKVM happens, I get dot corrupt (.corrupt) files created.
H2 Console: improved compatibility with Safari (Safari requires keep-alive) After several failed attempts (total
Random: the process didn't stop if generating the random seed using the standard across a database's lifespan), FILE_RENAME_FAILED_2 errors start occur
way (SecureRandom.generateSeed) was very slow. Now using a daemon thread until I delete the .corrupt files.
to avoid this problem.
SELECT UNION with a different number of ORDER BY columns did throw an ArrayIndexOutOfBoundsException.
When using view, the precision of column was changed to the default scale for some data types.
CSVWRITE now supports a 'null string' that is used for parsing and writing NULL.
Some long running queries could not be cancelled.
Queries with many outer join tables were very slow. Fixed.
Roadmap: Roadmap:
...@@ -405,6 +409,7 @@ Roadmap: ...@@ -405,6 +409,7 @@ Roadmap:
new TestCluster().runTest(this); new TestCluster().runTest(this);
new TestCompatibility().runTest(this); new TestCompatibility().runTest(this);
new TestCsv().runTest(this); new TestCsv().runTest(this);
new TestEncryptedDb().runTest(this);
new TestExclusive().runTest(this); new TestExclusive().runTest(this);
new TestFullText().runTest(this); new TestFullText().runTest(this);
new TestFunctions().runTest(this); new TestFunctions().runTest(this);
......
/*
* Copyright 2004-2008 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package org.h2.test.db;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import org.h2.test.TestBase;
/**
* Test using an encrypted database.
*/
public class TestEncryptedDb extends TestBase {
public void test() throws Exception {
if (config.memory || config.cipher != null) {
return;
}
deleteDb("exclusive");
Connection conn = getConnection("exclusive;CIPHER=AES", "sa", "123 123");
Statement stat = conn.createStatement();
stat.execute("CREATE TABLE TEST(ID INT)");
stat.execute("CHECKPOINT");
stat.execute("SET WRITE_DELAY 0");
stat.execute("INSERT INTO TEST VALUES(1)");
stat.execute("SHUTDOWN IMMEDIATELY");
try {
conn.close();
} catch (SQLException e) {
checkNotGeneralException(e);
}
try {
conn = getConnection("exclusive;CIPHER=AES", "sa", "1234 1234");
error();
} catch (SQLException e) {
checkNotGeneralException(e);
}
conn = getConnection("exclusive;CIPHER=AES", "sa", "123 123");
stat = conn.createStatement();
ResultSet rs = stat.executeQuery("SELECT * FROM TEST");
check(rs.next());
check(1, rs.getInt(1));
checkFalse(rs.next());
conn.close();
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论