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

--no commit message

--no commit message
上级 cd697858
#Sun Apr 29 09:21:04 CEST 2007
#Sat Jun 16 21:45:09 CEST 2007
javac=javac
benchmark.drivers.dir=D\:/data/java
version.name.maven=1.0.20070304
version.name.maven=1.0.20070617
jdk=1.4
......@@ -103,6 +103,7 @@
<javac target="${jdk}" source="${jdk}" executable="${javac}" srcdir="src/systray" destdir="bin" debug="true"/>
<copy todir="bin" overwrite="true">
<fileset dir="src/main" includes="META-INF/**/*"/>
<fileset dir="src/main" includes="**/*.png"/>
<fileset dir="src/systray" includes="**/*.ico"/>
<fileset dir="src/installer" includes="*.bat"/>
<fileset dir="src/test" includes="**/*.txt"/>
......
......@@ -65,7 +65,7 @@ The version is currently 1.0.&lt;year&gt;&lt;month&gt;&lt;day&gt;. Example:
&lt;dependency&gt;
&lt;groupId&gt;com.h2database&lt;/groupId&gt;
&lt;artifactId&gt;h2&lt;/artifactId&gt;
&lt;version&gt;1.0.20070304&lt;/version&gt;
&lt;version&gt;1.0.20070429&lt;/version&gt;
&lt;/dependency&gt;
</pre>
......
......@@ -11,10 +11,10 @@ H2 Database Engine
<h1>Downloads</h1>
<h3>Version 1.0 / 2007-04-29 (Current)</h3>
<h3>Version 1.0 / 2007-06-17 (Current)</h3>
<p>
<a href="http://www.h2database.com/h2-setup-2007-04-29.exe">Windows Installer (2.9 MB)</a><br />
<a href="http://www.h2database.com/h2-2007-04-29.zip">Platform-Independent Zip (3.8 MB)</a><br />
<a href="http://www.h2database.com/h2-setup-2007-06-17.exe">Windows Installer (2.9 MB)</a><br />
<a href="http://www.h2database.com/h2-2007-06-17.zip">Platform-Independent Zip (3.8 MB)</a><br />
</p>
<h3>Version 1.0 / 2007-03-04 (Last Stable)</h3>
......
......@@ -29,14 +29,14 @@ Frequently Asked Questions
<a href="#reliable">
Is it Reliable?</a><br />
<a href="#gcj">
Is the GCJ version stable? Faster?</a><br />
Is the GCJ version stable? Faster?</a><br />
<br /><a name="known_bugs"></a>
<h3>Are there any known bugs? When is the next release?</h3>
<p>
Usually, bugs get fixes as they are found. There is a release every few weeks.
Here is the list of known and confirmed issues as of
2007-04-29:
2007-06-17:
</p>
<ul>
<li>Can not build using the test cases ant with JDK 1.3 at the moment. However most things are fixed.
......@@ -60,7 +60,7 @@ Follow this checklist:
<ul>
<li>Run ANALYSE (see documentation for details).
</li><li>Run the query with EXPLAIN and check if indexes are used (see documentation for details).
</li><li>If required, create additional indexes and try again using ANALZYE and EXPLAIN.
</li><li>If required, create additional indexes and try again using ANALYZE and EXPLAIN.
</li><li>If it doesn't help please report the problem.
</li>
</ul>
......
......@@ -36,24 +36,24 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch.
<h3>Version 1.0 (Current)</h3>
<h3>Version 1.0 / 2007-TODO</h3><ul>
<h3>Version 1.0 / 2007-06-17 (Build 50)</h3><ul>
<li>File names starting with ~ are now in the user directory (Java system property user.home)
</li><li>New Console starter application uses the JDK 1.6 system tray functionality if available,
or a simple AWT frame for other platforms. To try it out, execute
java org.h2.tools.Console. Feedback is welcome.
This console starter application is not the default yet,
but the plan is to remove the SysTray tool in the future.
or a simple AWT frame for other platforms. To try it out, execute
java org.h2.tools.Console. Feedback is welcome.
This console starter application is not the default yet,
but the plan is to remove the SysTray tool in the future.
</li><li>New method Csv.write(Writer writer, ResultSet rs)
</li><li>If a Reader or InputStream of a LOB is not closed, the LOB can not be deleted (embedded mode only).
The exception is typically 'Error while renaming file'). As a workaround, set the system property
'h2.lobCloseBetweenReads' to true to close the LOB files between read operations.
However this slows down reading.
The exception is typically 'Error while renaming file'). As a workaround, set the system property
'h2.lobCloseBetweenReads' to true to close the LOB files between read operations.
However this slows down reading.
</li><li>Server mode: the server stack trace was included in SQLException messages. Fixed.
</li><li>Views support has been partially re-implemented. Views are up to 6 times faster.
Compared to regular queries, only 20% overhead. Because this is a bigger change,
it is not enabled by default. To enable it, set the system property 'h2.indexNew' to true
(java -Dh2.indexNew=true ..., or in source code Constants.INDEX_NEW = true).
If no problems are found, this will be enabled by default in the next release.
Compared to regular queries, only 20% overhead. Because this is a bigger change,
it is not enabled by default. To enable it, set the system property 'h2.indexNew' to true
(java -Dh2.indexNew=true ..., or in source code Constants.INDEX_NEW = true).
If no problems are found, this will be enabled by default in the next release.
</li><li>In INSERT and MERGE statements, each column may only be specified once now.
</li><li>For most IOExceptions now the file name is included in the error message.
</li><li>A java.util.Date object is now converted to a TIMESTAMP in the JDBC API. Previously it was converted to a DATE.
......@@ -66,7 +66,7 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch.
</li><li>The aggregate function COUNT(...) now returns a long instead of an int.
</li><li>The 'ordering' of data types was not always correct, for example an operation involving REAL and DOUBLE produced a result of type REAL. Fixed.
</li><li>CSV tool: If the same instance was used for reading and writing, the tool wrote the column names twice. Fixed.
</li><li>Compatibility: Support for the data type notation CHARACTER VARYING
</li><li>Compatibility: Support for the data type notation CHARACTER VARYING.
</li><li>Can now ORDER BY -1 (meaning order by first column, descending), and ORDER BY ? (parameterized column number).
</li><li>Databases with invalid linked tables (for example, because the target database is not accessible) can now be opened.
Old table links don't work however.
......
......@@ -30,17 +30,17 @@ Welcome to H2, the free SQL database. The main feature of H2 are:
<table style="border: 0px; margin: 5px; background-color: #eee;">
<tr><td style="border: 0px; background-color: #eee;" colspan="2">
<h3>Download</h3>
Version 1.0 / 2007-04-29:
Version 1.0 / 2007-06-17:
</td></tr>
<tr><td style="border: 0px; background-color: #eee;">
<a href="http://www.h2database.com/h2-setup-2007-04-29.exe"><img border="1" src="images/download.png" alt="download" /></a>
<a href="http://www.h2database.com/h2-setup-2007-06-17.exe"><img border="1" src="images/download.png" alt="download" /></a>
</td><td style="vertical-align: middle; border: 0px; background-color: #eee;">
<a href="http://www.h2database.com/h2-setup-2007-04-29.exe">Windows Installer (2.9 MB)</a>
<a href="http://www.h2database.com/h2-setup-2007-06-17.exe">Windows Installer (2.9 MB)</a>
</td></tr>
<tr><td style="border: 0px; background-color: #eee;">
<a href="http://www.h2database.com/h2-2007-04-29.zip"><img border="1" src="images/download.png" alt="download" /></a>
<a href="http://www.h2database.com/h2-2007-06-17.zip"><img border="1" src="images/download.png" alt="download" /></a>
</td><td style="vertical-align: middle; border: 0px; background-color: #eee;">
<a href="http://www.h2database.com/h2-2007-04-29.zip">Platform-Independent Zip (3.8 MB)</a>
<a href="http://www.h2database.com/h2-2007-06-17.zip">Platform-Independent Zip (3.8 MB)</a>
</td></tr>
<tr><td style="border: 0px; background-color: #eee;" colspan="2">
<a href="download.html">All Downloads</a>
......
......@@ -28,45 +28,53 @@ Please note this is mostly a single connection benchmark run on one computer.
<h3>Embedded</h3>
<table border="1" class="bar">
<tr><th>Test Case</th><th>Unit</th><th>H2</th><th>HSQLDB</th><th>Derby</th></tr>
<tr><td>Simple: Init</td><td>ms</td><td>234</td><td>219</td><td>4187</td></tr>
<tr><td>Simple: Query (random)</td><td>ms</td><td>188</td><td>140</td><td>1281</td></tr>
<tr><td>Simple: Query (sequential)</td><td>ms</td><td>156</td><td>125</td><td>1187</td></tr>
<tr><td>Simple: Update (random)</td><td>ms</td><td>344</td><td>594</td><td>7047</td></tr>
<tr><td>Simple: Delete (sequential)</td><td>ms</td><td>156</td><td>125</td><td>4203</td></tr>
<tr><td>Simple: Memory Usage</td><td>MB</td><td>3</td><td>6</td><td>6</td></tr>
<tr><td>BenchA: Init</td><td>ms</td><td>172</td><td>125</td><td>4812</td></tr>
<tr><td>BenchA: Transactions</td><td>ms</td><td>828</td><td>812</td><td>10282</td></tr>
<tr><td>BenchA: Memory Usage</td><td>MB</td><td>7</td><td>10</td><td>8</td></tr>
<tr><td>BenchC: Init</td><td>ms</td><td>734</td><td>296</td><td>9469</td></tr>
<tr><td>BenchC: Transactions</td><td>ms</td><td>1797</td><td>23782</td><td>10140</td></tr>
<tr><td>BenchC: Memory Usage</td><td>MB</td><td>10</td><td>16</td><td>8</td></tr>
<tr><td>Total Time</td><td>ms</td><td>4609</td><td>26218</td><td>52624</td></tr>
<tr><td>Statement per Second</td><td>#</td><td>34446</td><td>6055</td><td>3016</td></tr>
<tr><td>Simple: Init</td><td>ms</td><td>531</td><td>781</td><td>8578</td></tr>
<tr><td>Simple: Query (random)</td><td>ms</td><td>312</td><td>312</td><td>2187</td></tr>
<tr><td>Simple: Query (sequential)</td><td>ms</td><td>219</td><td>250</td><td>2282</td></tr>
<tr><td>Simple: Update (random)</td><td>ms</td><td>828</td><td>1344</td><td>14484</td></tr>
<tr><td>Simple: Delete (sequential)</td><td>ms</td><td>203</td><td>266</td><td>10734</td></tr>
<tr><td>Simple: Memory Usage</td><td>MB</td><td>7</td><td>9</td><td>12</td></tr>
<tr><td>BenchA: Init</td><td>ms</td><td>360</td><td>532</td><td>10563</td></tr>
<tr><td>BenchA: Transactions</td><td>ms</td><td>7469</td><td>1687</td><td>19594</td></tr>
<tr><td>BenchA: Memory Usage</td><td>MB</td><td>12</td><td>12</td><td>9</td></tr>
<tr><td>BenchB: Init</td><td>ms</td><td>1343</td><td>3547</td><td>27593</td></tr>
<tr><td>BenchB: Transactions</td><td>ms</td><td>2141</td><td>1375</td><td>7157</td></tr>
<tr><td>BenchB: Memory Usage</td><td>MB</td><td>8</td><td>9</td><td>7</td></tr>
<tr><td>BenchC: Init</td><td>ms</td><td>625</td><td>391</td><td>13438</td></tr>
<tr><td>BenchC: Transactions</td><td>ms</td><td>2281</td><td>58375</td><td>15094</td></tr>
<tr><td>BenchC: Memory Usage</td><td>MB</td><td>15</td><td>15</td><td>9</td></tr>
<tr><td>Executed Statements</td><td>#</td><td>594255</td><td>594255</td><td>594255</td></tr>
<tr><td>Total Time</td><td>ms</td><td>16312</td><td>68860</td><td>131704</td></tr>
<tr><td>Statement per Second</td><td>#</td><td>36430</td><td>8629</td><td>4512</td></tr>
</table>
<h3>Client-Server</h3>
<table border="1" class="bar">
<tr><th>Test Case</th><th>Unit</th><th>H2</th><th>HSQLDB</th><th>Derby</th><th>PostgreSQL</th><th>MySQL</th></tr>
<tr><td>Simple: Init</td><td>ms</td><td>1157</td><td>1187</td><td>5688</td><td>2391</td><td>1547</td></tr>
<tr><td>Simple: Query (random)</td><td>ms</td><td>1312</td><td>1265</td><td>5406</td><td>2672</td><td>1578</td></tr>
<tr><td>Simple: Query (sequential)</td><td>ms</td><td>1266</td><td>1219</td><td>6203</td><td>2406</td><td>1578</td></tr>
<tr><td>Simple: Update (random)</td><td>ms</td><td>1375</td><td>1547</td><td>9328</td><td>2953</td><td>1844</td></tr>
<tr><td>Simple: Delete (sequential)</td><td>ms</td><td>515</td><td>578</td><td>4688</td><td>1235</td><td>859</td></tr>
<tr><td>Simple: Memory Usage</td><td>MB</td><td>4</td><td>7</td><td>6</td><td>0</td><td>0</td></tr>
<tr><td>BenchA: Init</td><td>ms</td><td>610</td><td>547</td><td>5781</td><td>1454</td><td>1063</td></tr>
<tr><td>BenchA: Transactions</td><td>ms</td><td>3203</td><td>3453</td><td>14515</td><td>6625</td><td>4015</td></tr>
<tr><td>BenchA: Memory Usage</td><td>MB</td><td>7</td><td>11</td><td>9</td><td>0</td><td>0</td></tr>
<tr><td>BenchC: Init</td><td>ms</td><td>1218</td><td>782</td><td>10922</td><td>1796</td><td>2406</td></tr>
<tr><td>BenchC: Transactions</td><td>ms</td><td>5547</td><td>24343</td><td>17796</td><td>8313</td><td>5390</td></tr>
<tr><td>BenchC: Memory Usage</td><td>MB</td><td>10</td><td>16</td><td>10</td><td>0</td><td>1</td></tr>
<tr><td>Total Time</td><td>ms</td><td>16265</td><td>34921</td><td>80359</td><td>30189</td><td>20296</td></tr>
<tr><td>Statement per Second</td><td>#</td><td>9761</td><td>4546</td><td>1975</td><td>5259</td><td>7823</td></tr>
<tr><td>Simple: Init</td><td>ms</td><td>3640</td><td>2875</td><td>9968</td><td>4078</td><td>3203</td></tr>
<tr><td>Simple: Query (random)</td><td>ms</td><td>3266</td><td>2578</td><td>12110</td><td>6594</td><td>2969</td></tr>
<tr><td>Simple: Query (sequential)</td><td>ms</td><td>2875</td><td>2437</td><td>12250</td><td>5547</td><td>2906</td></tr>
<tr><td>Simple: Update (random)</td><td>ms</td><td>2922</td><td>3469</td><td>18937</td><td>5500</td><td>4187</td></tr>
<tr><td>Simple: Delete (sequential)</td><td>ms</td><td>1172</td><td>1266</td><td>12797</td><td>2390</td><td>1704</td></tr>
<tr><td>Simple: Memory Usage</td><td>MB</td><td>7</td><td>9</td><td>13</td><td>0</td><td>0</td></tr>
<tr><td>BenchA: Init</td><td>ms</td><td>2765</td><td>2329</td><td>12469</td><td>3860</td><td>2969</td></tr>
<tr><td>BenchA: Transactions</td><td>ms</td><td>9750</td><td>8953</td><td>33610</td><td>15828</td><td>10500</td></tr>
<tr><td>BenchA: Memory Usage</td><td>MB</td><td>12</td><td>13</td><td>10</td><td>0</td><td>0</td></tr>
<tr><td>BenchB: Init</td><td>ms</td><td>9719</td><td>11016</td><td>40156</td><td>17047</td><td>12062</td></tr>
<tr><td>BenchB: Transactions</td><td>ms</td><td>4203</td><td>3375</td><td>10313</td><td>6312</td><td>3469</td></tr>
<tr><td>BenchB: Memory Usage</td><td>MB</td><td>8</td><td>10</td><td>8</td><td>0</td><td>0</td></tr>
<tr><td>BenchC: Init</td><td>ms</td><td>1828</td><td>1562</td><td>15094</td><td>2188</td><td>3375</td></tr>
<tr><td>BenchC: Transactions</td><td>ms</td><td>9406</td><td>56907</td><td>27312</td><td>10609</td><td>6281</td></tr>
<tr><td>BenchC: Memory Usage</td><td>MB</td><td>16</td><td>16</td><td>13</td><td>0</td><td>1</td></tr>
<tr><td>Executed Statements</td><td>#</td><td>594255</td><td>594255</td><td>594255</td><td>594255</td><td>594255</td></tr>
<tr><td>Total Time</td><td>ms</td><td>51546</td><td>96767</td><td>205016</td><td>79953</td><td>53625</td></tr>
<tr><td>Statement per Second</td><td>#</td><td>11528</td><td>6141</td><td>2898</td><td>7432</td><td>11081</td></tr>
</table>
<h3>Benchmark Results and Comments</h3>
<h4>H2</h4>
Version 0.9 (2006-11-03) was used for the test.
Version 1.0 (2007-06-17) was used for the test.
For simpler operations, the performance of H2 is about the same as for HSQLDB.
For more complex queries, the query optimizer is very important.
However H2 is not very fast in every case, certain kind of queries may still be slow.
......@@ -93,12 +101,9 @@ A disadvantage in HSQLDB is the slow startup / shutdown time (currently not list
The reason is, a backup of the database is created whenever the database is opened or closed.
<h4>Derby</h4>
Version 10.2.1.6 was used for the test. The cache size is set to 8192 pages by calling
CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize', '8192').
Derby is clearly the slowest embedded database in this test.
This seems to be a structural problem,
because all operations are really slow. It will not be easy for the developers of
Derby to improve the performance to a reasonable level.
Version 10.2.1.6 was used for the test. Derby is clearly the slowest embedded database in this test.
This seems to be a structural problem, because all operations are really slow.
It will not be easy for the developers of Derby to improve the performance to a reasonable level.
<h4>PostgreSQL</h4>
Version 8.1.4 was used for the test.
......@@ -153,7 +158,7 @@ For the Java databases, both embedded and server modes are tested.
<h4>Test Platform</h4>
This test is run on Windows XP with the virus scanner switched off.
The VM used is Sun JDK 1.4.
The VM used is Sun JDK 1.5.
<h4>Multiple Runs</h4>
When a Java benchmark is run first, the code is not fully compiled and
......
h2/src/docsrc/html/quickstart-1.png

13.7 KB | W: | H:

h2/src/docsrc/html/quickstart-1.png

13.6 KB | W: | H:

h2/src/docsrc/html/quickstart-1.png
h2/src/docsrc/html/quickstart-1.png
h2/src/docsrc/html/quickstart-1.png
h2/src/docsrc/html/quickstart-1.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -29,7 +29,7 @@ Install the software using the Windows Installer (if you did not yet do that).
Click <span class="button">Start</span>,
<span class="button">All Programs</span>,
<span class="button">H2</span>, and
<span class="button">H2 Console (Native)</span>:<br />
<span class="button">H2 Console (Command Line)</span>:<br />
<img class="screenshot" src="quickstart-1.png" alt="screenshot: start H2 Console" /><br />
A new console window appears:<br />
<img class="screenshot" src="quickstart-2.png" alt="screenshot: H2 Running" /><br />
......
......@@ -47,7 +47,7 @@ Depending on your platform and environment, there are multiple ways to start the
<td>Windows</td>
<td>1.4 or 1.5</td>
<td>
Click [Start], [All Programs], [H2], and [H2 Console]<br />
Click [Start], [All Programs], [H2], and [H2 Console (Command Line)]<br />
If this worked correctly, an icon will be added to the system tray:
<img src="h2.png" alt="[H2 icon]" /><br />
If you don't get the system tray icon, then maybe Java is not installed correctly (in this case, try another way to start the application).
......
......@@ -42,6 +42,7 @@ Package org.h2.tools<br />
<a href="org/h2/tools/Backup.html" target="javadoc">Backup</a><br />
<a href="org/h2/tools/ChangePassword.html" target="javadoc">ChangePassword</a><br />
<a href="org/h2/tools/CompressTool.html" target="javadoc">CompressTool</a><br />
<a href="org/h2/tools/Console.html" target="javadoc">Console</a><br />
<a href="org/h2/tools/ConvertTraceFile.html" target="javadoc">ConvertTraceFile</a><br />
<a href="org/h2/tools/CreateCluster.html" target="javadoc">CreateCluster</a><br />
<a href="org/h2/tools/Csv.html" target="javadoc">Csv</a><br />
......
......@@ -28,6 +28,7 @@ package org.h2.engine;
*
* - Change FAQ (next release planned, known bugs)
* - Check version, change build number in Constants.java and ant-build.properties
* - Maybe increase TCP_DRIVER_VERSION
* - Check code coverage
* - No " Message.getInternalError" (must be "throw Message.getInternalError")
* - No TODO in the docs
......@@ -35,7 +36,6 @@ package org.h2.engine;
* - Change version(s) in performance.html; use latest versions of other databases
* - Run 'ant benchmark' (with JDK 1.4 currently)
* - Copy the benchmark results and update the performance page and diagram
* (remove 2*executed statement)
*
* - Documentation: if there are new files, add them to MergeDocs
* - Documentation: check if all javadoc files are in the index
......@@ -67,15 +67,15 @@ package org.h2.engine;
*/
public class Constants {
public static final int BUILD_ID = 48;
private static final String BUILD = "2007-06-14";
public static final int BUILD_ID = 50;
private static final String BUILD = "2007-06-17";
public static final int VERSION_MAJOR = 1;
public static final int VERSION_MINOR = 0;
public static final int FILE_BLOCK_SIZE = 16;
public static final String MAGIC_FILE_HEADER_TEXT = "-- H2 0.5/T -- ".substring(0, FILE_BLOCK_SIZE-1) + "\n";
public static final String MAGIC_FILE_HEADER = "-- H2 0.5/B -- ".substring(0, FILE_BLOCK_SIZE-1) + "\n";
public static final int TCP_DRIVER_VERSION = 3;
public static final int TCP_DRIVER_VERSION = 4;
public static final int VERSION_JDBC_MAJOR = 3;
public static final int VERSION_JDBC_MINOR = 0;
......
......@@ -110,6 +110,11 @@ public class JdbcSQLException extends SQLException {
return cause;
}
/**
* Returns the class name, the message, and in the server mode, the stack trace of the server
*
* @return the string representation
*/
public String toString() {
if(trace == null) {
return super.toString();
......
......@@ -31,11 +31,24 @@ import org.h2.tools.Server;
import org.h2.util.IOUtils;
import org.h2.util.StartBrowser;
/**
* This tool starts the H2 Console (web-) server, as well as the TCP and ODBC server.
* For JDK 1.6, a system tray icon is created, for platforms that support it.
* Otherwise, a small window opens.
*
*/
public class Console implements ActionListener, MouseListener {
private static final Font FONT = new Font("Dialog", Font.PLAIN, 11);
private Server web;
/**
* The command line interface for this tool.
* The command line options are the same as in the Server tool.
*
* @param args the command line arguments
* @throws Exception
*/
public static void main(String[] args) throws Exception {
new Console().run(args);
}
......@@ -54,7 +67,15 @@ public class Console implements ActionListener, MouseListener {
}
}
try {
createMenu();
InputStream in = getClass().getResourceAsStream("/org/h2/res/h2.png");
Image image = null;
if(in != null) {
byte[] imageData = IOUtils.readBytesAndClose(in, -1);
image = Toolkit.getDefaultToolkit().createImage(imageData);
}
if(!createTrayIcon(image)) {
showWindow(image);
}
} catch (Exception e) {
e.printStackTrace();
}
......@@ -67,32 +88,29 @@ public class Console implements ActionListener, MouseListener {
}
}
private void createMenu() throws Exception {
InputStream in = getClass().getResourceAsStream("/org/h2/res/h2.png");
byte[] imageData = IOUtils.readBytesAndClose(in, -1);
Image image = Toolkit.getDefaultToolkit().createImage(imageData);
PopupMenu menuConsole = new PopupMenu();
MenuItem itemConsole = new MenuItem("H2 Console");
itemConsole.setActionCommand("console");
itemConsole.addActionListener(this);
itemConsole.setFont(FONT);
menuConsole.add(itemConsole);
MenuItem itemExit = new MenuItem("Exit");
itemExit.setFont(FONT);
itemExit.setActionCommand("exit");
itemExit.addActionListener(this);
menuConsole.add(itemExit);
boolean showWindow;
private boolean createTrayIcon(Image image) {
try {
// SystemTray.isSupported();
Boolean supported = (Boolean) Class.forName("java.awt.SystemTray").
getMethod("isSupported", new Class[0]).
invoke(null, new Object[0]);
if(!supported.booleanValue()) {
showWindow = true;
return false;
}
PopupMenu menuConsole = new PopupMenu();
MenuItem itemConsole = new MenuItem("H2 Console");
itemConsole.setActionCommand("console");
itemConsole.addActionListener(this);
itemConsole.setFont(FONT);
menuConsole.add(itemConsole);
MenuItem itemExit = new MenuItem("Exit");
itemExit.setFont(FONT);
itemExit.setActionCommand("exit");
itemExit.addActionListener(this);
menuConsole.add(itemExit);
// TrayIcon icon = new TrayIcon(image, "H2 Database Engine", menuConsole);
Object icon = Class.forName("java.awt.TrayIcon").
getConstructor(new Class[] { Image.class, String.class, PopupMenu.class }).
......@@ -113,24 +131,22 @@ public class Console implements ActionListener, MouseListener {
getMethod("add", new Class[] { Class.forName("java.awt.TrayIcon") }).
invoke(tray, new Object[] { icon });
showWindow = false;
return true;
} catch (Exception e) {
showWindow = true;
}
if(showWindow) {
showWindow(image);
return false;
}
}
private void showWindow(Image image) {
Frame frame = new Frame("H2 Console");
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent we) {
System.exit(0);
}
});
frame.setIconImage(image);
if(image != null) {
frame.setIconImage(image);
}
frame.setResizable(false);
frame.setBackground(SystemColor.control);
......@@ -180,6 +196,9 @@ public class Console implements ActionListener, MouseListener {
frame.setVisible(true);
}
/**
* INTERNAL
*/
public void actionPerformed(ActionEvent e) {
if (e.getActionCommand().equals("exit")) {
System.exit(0);
......@@ -194,21 +213,36 @@ public class Console implements ActionListener, MouseListener {
}
}
/**
* INTERNAL
*/
public void mouseClicked(MouseEvent e) {
if(e.getButton() == MouseEvent.BUTTON1) {
startBrowser();
}
}
/**
* INTERNAL
*/
public void mouseEntered(MouseEvent e) {
}
/**
* INTERNAL
*/
public void mouseExited(MouseEvent e) {
}
/**
* INTERNAL
*/
public void mousePressed(MouseEvent e) {
}
/**
* INTERNAL
*/
public void mouseReleased(MouseEvent e) {
}
......
......@@ -214,7 +214,7 @@ public class DateTimeUtils {
throw Message.getInternalError("type:"+type);
}
} catch(IllegalArgumentException e) {
throw Message.getSQLException(errorCode, s);
throw Message.getSQLException(errorCode, new String[]{s}, e);
}
}
......
......@@ -464,7 +464,7 @@ public class FileUtils {
}
public static String translateFileName(String fileName) {
if(fileName.startsWith("~")) {
if(fileName != null && fileName.startsWith("~")) {
String userDir = System.getProperty("user.home");
fileName = userDir + fileName.substring(1);
}
......
......@@ -10,6 +10,86 @@ INSERT INTO CHANNEL VALUES('H2 Database Engine' ,
CREATE TABLE ITEM(ID INT PRIMARY KEY, TITLE VARCHAR, ISSUED TIMESTAMP, DESC VARCHAR);
INSERT INTO ITEM VALUES(24,
'New version available: 1.0 / 2007-06-17', '2007-06-17 12:00:00',
'A new version of H2 is available for <a href="http://www.h2database.com">download</a>.
<br />
<b>Changes and new functionality:</b>
<ul>
<li>New Console starter application uses the JDK 1.6 system tray
functionality if available, or a simple AWT frame for other platforms.
To try it out, execute java org.h2.tools.Console. Feedback is welcome.
This console starter application is not the default yet,
but the plan is to remove the SysTray tool in the future.
</li><li>If a Reader or InputStream of a LOB is not closed,
the LOB can not be deleted (embedded mode only). The exception is
typically ''Error while renaming file''). As a workaround, set the
system property ''h2.lobCloseBetweenReads'' to true to close the LOB
files between read operations. However this slows down reading.
</li><li>Views support has been partially re-implemented.
Views are up to 6 times faster. Compared to regular queries, only
20% overhead. Because this is a bigger change, it is not enabled
by default. To enable it, set the system property ''h2.indexNew''
to true (java -Dh2.indexNew=true ..., or in source code
Constants.INDEX_NEW = true). If no problems are found, this will
be enabled by default in the next release.
</li><li>Support for the data type CHAR. The difference to
VARCHAR is: trailing spaces are ignored. This data type is supported
for compatibility with other databases and older applications.
</li><li>Compatibility: Support for the data type notation
CHARACTER VARYING.
</li><li>File names starting with ~ are now in the user directory
(Java system property user.home)
</li><li>Can now ORDER BY -1 (meaning order by first column,
descending), and ORDER BY ? (parameterized column number).
</li><li>Linked tables can now emit UPDATE statements if
''EMIT UPDATES'' is specified in the CREATE LINKED TABLE statement.
So far, updating a row always deleted the old row and then inserted
the new row.
</li><li>New functions LEAST and GREATEST to get the smallest or
largest value from a list.
</li><li>For most IOExceptions now the file name is included in
the error message.
</li><li>New method Csv.write(Writer writer, ResultSet rs)
</li><li>The table id (important for LOB files) is now included in
INFORMATION_SCHEMA.TABLES.
</li><li>The aggregate function COUNT(...) now returns a long
instead of an int.
</li>
</ul>
<b>Bugfixes:</b>
<ul>
<li>In the last release, the H2 Console opened two connection
when logging into a database, and only closed one connection
when logging out. Fixed.
</li><li>In many situations, views did not use an index if they
could have. Fixed. Also the explain plan for views works now.
</li><li>Server mode: the server stack trace was included in
SQLException messages. Fixed.
</li><li>Databases with invalid linked tables (for example, because
the target database is not accessible) can now be opened. Old
table links don''t work however.
</li><li>In INSERT and MERGE statements, each column may
only be specified once now.
</li><li>A java.util.Date object is now converted to a TIMESTAMP
in the JDBC API. Previously it was converted to a DATE.
</li><li>After calling SHUTDOWN and closing the connection and
a superfluous error message appeared in the trace file. Fixed.
</li><li>When using DISTINCT, ORDER BY a function works now
as long as it is in the column list.
</li><li>The ''ordering'' of data types was not always correct,
for example an operation involving REAL and DOUBLE produced
a result of type REAL. Fixed.
</li><li>CSV tool: If the same instance was used for reading
and writing, the tool wrote the column names twice. Fixed.
</li><li>There was a small memory leak in the trace module.
One object per opened connection was kept in a hash map.
</li>
</ul>
For future plans, see the new ''Roadmap'' page on the web site.
</ul>
');
INSERT INTO ITEM VALUES(23,
'New version available: 1.0 / 2007-04-29', '2007-04-29 12:00:00',
'A new version of H2 is available for <a href="http://www.h2database.com">download</a>.
......@@ -576,40 +656,6 @@ The plans for the next release (RC 2) are:
</li></ul>
');
INSERT INTO ITEM VALUES(6,
'New version available: 0.9 Beta / 2006-08-14', '2006-08-14 12:00:00',
'A new version of H2 is available for <a href="http://www.h2database.com">download</a>.
<br />
<b>Changes and new functionality:</b>
<ul>
<li>Autocomplete support in the H2 Console.
Three levels: Off, Normal (default; table and column names), Full (complete SQL grammar).
Schemas and quoted identifiers are not yet supported.
There are some browser issues, but everything should work in Firefox.
Please report any incompatibilities, problems and usability issues.
</li><li>Source code to support H2 in Resin is included.
For the complete patch, see http://forum.caucho.com/node/61
</li><li>Space is better re-used after deleting many records.
</li><li>Umlauts and chinese characters are now supported in identifier names.
</li><li>Performance optimization for outer join with comparison with constants in the where clause.
</li></ul>
<b>Bugfixes:</b>
<ul>
<li>SET LOG 0 didn''t work. Fixed.
</li><li>Fixed a problem when comparing BIGINT values with constants.
</li><li>Fixed NULL handling where there is a NULL value in the list.
</li><li>It is now possible to cancel a select statement with a (temporary) view.
</li></ul>
For details see also the history. The next release is planned for 2006-08-28.
If everything goes fine this will be 1.0 final (there might be a release candidate or two before this date).
The plans for the next release are:
<ul>
<li>Bugfixes, write more tests, more bugfixes, more tests.
</li><li>Proposal for changed license.
</li><li>For other plans, see the new ''Roadmap'' part on the web site.
</li></ul>
');
SELECT 'newsfeed-rss.xml' FILE,
XMLSTARTDOC() ||
XMLNODE('rss', XMLATTR('version', '2.0'),
......
......@@ -91,11 +91,21 @@ java -Xmx512m -Xrunhprof:cpu=samples,depth=8 org.h2.tools.RunScript -url jdbc:h2
long time = System.currentTimeMillis();
TestAll test = new TestAll();
test.printSystem();
/*
Newletter, newsfeed hochladen
SimpleDateFormat must be synchronized externally
call cast(null as null)
h2 console: headless mode
h2 console system tray: menu item to open window
Set h2.indexNew to false
16 > 2007-06-17
testHalt
support ~ dir
......
......@@ -454,7 +454,10 @@ sandbox greatest whatever placeholder creative leak hacker benefits station
million prevention stuck titles fiche blogs showed widespread cut placeholders
graph prohibit confusing clever automated nutshell scriptella etl tamava semmle
googlegroups guidewire thecodist captcha brewster semmle ddlutils analyse dave
maxvalue samooha dbrewster minvalue darwin
maxvalue samooha dbrewster minvalue darwin follow graphics typically
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
### check those again:
populate slowly xacon inser maxbqualsize counter regards attaching official xatest
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论