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

indentation

上级 a10beefa
...@@ -281,10 +281,10 @@ java org.h2.tools.Server ...@@ -281,10 +281,10 @@ java org.h2.tools.Server
Run the tool on the command line: Run the tool on the command line:
<pre> <pre>
java org.h2.tools.CreateCluster java org.h2.tools.CreateCluster
-urlSource jdbc:h2:tcp://localhost:9101/~/test -urlSource jdbc:h2:tcp://localhost:9101/~/test
-urlTarget jdbc:h2:tcp://localhost:9102/~/test -urlTarget jdbc:h2:tcp://localhost:9102/~/test
-user sa -user sa
-serverList localhost:9101,localhost:9102 -serverList localhost:9101,localhost:9102
</pre> </pre>
</li><li>You can now connect to the databases using </li><li>You can now connect to the databases using
an application or the H2 Console using the JDBC URL an application or the H2 Console using the JDBC URL
...@@ -1112,98 +1112,87 @@ OR X = 2 OR X = 2 OR X = 2 OR X = 2 OR X = 2 ...@@ -1112,98 +1112,87 @@ OR X = 2 OR X = 2 OR X = 2 OR X = 2 OR X = 2
<br /><a name="glossary_links"></a> <br /><a name="glossary_links"></a>
<h2>Glossary and Links</h2> <h2>Glossary and Links</h2>
<table><tr><th>Term</th><th>Description</th></tr> <table>
<tr> <tr>
<td>AES-128</td> <th>Term</th>
<td> <th>Description</th>
A block encryption algorithm. See also: </tr>
<a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">Wikipedia: AES</a> <tr>
</td> <td>AES-128</td>
</tr> <td>A block encryption algorithm. See also: <a
<tr> href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">Wikipedia:
<td>Birthday Paradox</td> AES</a></td>
<td> </tr>
Describes the higher than expected probability that two persons in a room have the same birthday. <tr>
Also valid for randomly generated UUIDs. See also: <td>Birthday Paradox</td>
<a href="http://en.wikipedia.org/wiki/Birthday_paradox">Wikipedia: Birthday Paradox</a> <td>Describes the higher than expected probability that two
</td> persons in a room have the same birthday. Also valid for randomly
</tr> generated UUIDs. See also: <a
<tr> href="http://en.wikipedia.org/wiki/Birthday_paradox">Wikipedia:
<td>Digest</td> Birthday Paradox</a></td>
<td> </tr>
Protocol to protect a password (but not to protect data). See also: <tr>
<a href="http://www.faqs.org/rfcs/rfc2617.html">RFC 2617: HTTP Digest Access Authentication</a> <td>Digest</td>
</td> <td>Protocol to protect a password (but not to protect data).
</tr> See also: <a href="http://www.faqs.org/rfcs/rfc2617.html">RFC
<tr> 2617: HTTP Digest Access Authentication</a></td>
<td>GCJ</td> </tr>
<td> <tr>
Compiler for Java. <td>GCJ</td>
<a href="http://gcc.gnu.org/java">GNU Compiler for the Java</a> and <td>Compiler for Java. <a href="http://gcc.gnu.org/java">GNU
<a href="http://www.dobysoft.com/products/nativej">NativeJ (commercial)</a> Compiler for the Java</a> and <a
</td> href="http://www.dobysoft.com/products/nativej">NativeJ
</tr> (commercial)</a></td>
<tr> </tr>
<td>HTTPS</td> <tr>
<td> <td>HTTPS</td>
A protocol to provide security to HTTP connections. See also: <td>A protocol to provide security to HTTP connections. See
<a href="http://www.ietf.org/rfc/rfc2818.txt">RFC 2818: HTTP Over TLS</a> also: <a href="http://www.ietf.org/rfc/rfc2818.txt">RFC 2818:
</td> HTTP Over TLS</a></td>
</tr> </tr>
<tr> <tr>
<td>Modes of Operation</td> <td>Modes of Operation</td>
<td> <td><a
<a href="http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation">Wikipedia: Block cipher modes of operation</a> href="http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation">Wikipedia:
</td> Block cipher modes of operation</a></td>
</tr> </tr>
<tr> <tr>
<td>Salt</td> <td>Salt</td>
<td> <td>Random number to increase the security of passwords. See
Random number to increase the security of passwords. also: <a href="http://en.wikipedia.org/wiki/Key_derivation_function">Wikipedia:
See also: Key derivation function</a></td>
<a href="http://en.wikipedia.org/wiki/Key_derivation_function">Wikipedia: Key derivation function</a> </tr>
</td> <tr>
</tr> <td>SHA-256</td>
<tr> <td>A cryptographic one-way hash function. See also: <a
<td>SHA-256</td> href="http://en.wikipedia.org/wiki/SHA_family">Wikipedia: SHA
<td> hash functions</a></td>
A cryptographic one-way hash function. </tr>
See also: <tr>
<a href="http://en.wikipedia.org/wiki/SHA_family">Wikipedia: SHA hash functions</a> <td>SQL Injection</td>
</td> <td>A security vulnerability where an application generates SQL
</tr> statements with embedded user input. See also: <a
<tr> href="http://en.wikipedia.org/wiki/SQL_injection">Wikipedia:
<td>SQL Injection</td> SQL Injection</a></td>
<td> </tr>
A security vulnerability where an application generates SQL statements with embedded user input. <tr>
See also: <td>Watermark Attack</td>
<a href="http://en.wikipedia.org/wiki/SQL_injection">Wikipedia: SQL Injection</a> <td>Security problem of certain encryption programs where the
</td> existence of certain data can be proven without decrypting. For more
</tr> information, search in the internet for 'watermark attack
<tr> cryptoloop'</td>
<td>Watermark Attack</td> </tr>
<td> <tr>
Security problem of certain encryption programs where the existence of certain <td>SSL/TLS</td>
data can be proven without decrypting. <td>Secure Sockets Layer / Transport Layer Security. See also:
For more information, search in the internet for 'watermark attack cryptoloop' <a href="http://java.sun.com/products/jsse/">Java Secure Socket
</td> Extension (JSSE)</a></td>
</tr> </tr>
<tr> <tr>
<td>SSL/TLS</td> <td>XTEA</td>
<td> <td>A block encryption algorithm. See also: <a
Secure Sockets Layer / Transport Layer Security. href="http://en.wikipedia.org/wiki/XTEA">Wikipedia: XTEA</a></td>
See also: </tr>
<a href="http://java.sun.com/products/jsse/">Java Secure Socket Extension (JSSE)</a>
</td>
</tr>
<tr>
<td>XTEA</td>
<td>
A block encryption algorithm.
See also:
<a href="http://en.wikipedia.org/wiki/XTEA">Wikipedia: XTEA</a>
</td>
</tr>
</table> </table>
<!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html> <!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html>
...@@ -487,7 +487,7 @@ Change Log ...@@ -487,7 +487,7 @@ Change Log
the zip file has been corrected. the zip file has been corrected.
</li><li>Invalid inline views threw confusing SQL exceptions. </li><li>Invalid inline views threw confusing SQL exceptions.
</li><li>The Japanese translation of the error messages and the </li><li>The Japanese translation of the error messages and the
H2 Console has been improved. Thanks a lot to Masahiro IKEMOTO. H2 Console has been improved. Thanks a lot to Masahiro IKEMOTO.
</li><li>Optimization for MIN() and MAX() when using MVCC. </li><li>Optimization for MIN() and MAX() when using MVCC.
</li><li>To protect against remote brute force password attacks, </li><li>To protect against remote brute force password attacks,
the delay after each unsuccessful login now gets double as long. the delay after each unsuccessful login now gets double as long.
...@@ -516,7 +516,7 @@ Change Log ...@@ -516,7 +516,7 @@ Change Log
now the 'true' is no longer needed. now the 'true' is no longer needed.
The old behavior is still supported. The old behavior is still supported.
</li><li>New system property h2.sortNullsHigh to invert the default sorting behavior </li><li>New system property h2.sortNullsHigh to invert the default sorting behavior
for NULL. The default didn't change. for NULL. The default didn't change.
</li><li>Performance was very slow when using LOG=2 and deleting or </li><li>Performance was very slow when using LOG=2 and deleting or
updating all rows of a table in a loop. Fixed. updating all rows of a table in a loop. Fixed.
</li><li>ALTER TABLE or CREATE TABLE now support parameters for the password field. </li><li>ALTER TABLE or CREATE TABLE now support parameters for the password field.
...@@ -566,8 +566,8 @@ Change Log ...@@ -566,8 +566,8 @@ Change Log
</li><li>Fulltext search: new method SEARCH_DATA that returns the column </li><li>Fulltext search: new method SEARCH_DATA that returns the column
names and primary keys as arrays. names and primary keys as arrays.
</li><li>New experimental optimization for GROUP BY queries if an index can be used </li><li>New experimental optimization for GROUP BY queries if an index can be used
that matches the group by columns. To enable this optimization, set the system that matches the group by columns. To enable this optimization, set the system
property h2.optimizeGroupSorted to true. property h2.optimizeGroupSorted to true.
</li><li>When using multi-version concurrency (MVCC=TRUE), duplicate rows could appear in the result set when running queries </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. with uncommitted changes in the same session.
</li><li>H2 Console: remote connections were very slow because getHostName/getRemoteHost was used. </li><li>H2 Console: remote connections were very slow because getHostName/getRemoteHost was used.
......
...@@ -137,7 +137,7 @@ to be dangerous by design, and some problems are hard to solve. Those are: ...@@ -137,7 +137,7 @@ to be dangerous by design, and some problems are hard to solve. Those are:
<ul> <ul>
<li>Using SET LOG 0 to disable the transaction log file. <li>Using SET LOG 0 to disable the transaction log file.
</li><li>Using the transaction isolation level READ_UNCOMMITTED (LOCK_MODE 0) while at the same time using multiple </li><li>Using the transaction isolation level READ_UNCOMMITTED (LOCK_MODE 0) while at the same time using multiple
connections may result in inconsistent transactions. connections may result in inconsistent transactions.
</li><li>Using FILE_LOCK=NO in the database URL. </li><li>Using FILE_LOCK=NO in the database URL.
</li></ul> </li></ul>
<p> <p>
......
...@@ -21,34 +21,34 @@ Initial Developer: H2 Group ...@@ -21,34 +21,34 @@ Initial Developer: H2 Group
</div> </div>
<form action="submit" onsubmit="return goFirst();"> <form action="submit" onsubmit="return goFirst();">
<table width="100%" class="search"> <table width="100%" class="search">
<tr class="search"> <tr class="search">
<td class="search" colspan="2"> <td class="search" colspan="2">
<a href="frame.html"><img src="images/language_en.gif" alt="English" /></a> <a href="frame.html"><img src="images/language_en.gif" alt="English" /></a>
<a href="frame_ja.html"><img src="images/language_ja.gif" alt="Japanese" /></a> <a href="frame_ja.html"><img src="images/language_ja.gif" alt="Japanese" /></a>
</td> </td>
</tr> </tr>
<tr class="search"> <tr class="search">
<td class="search" colspan="2"> <td class="search" colspan="2">
<b> Search: </b> <b> Search: </b>
</td> </td>
</tr> </tr>
<tr class="search"> <tr class="search">
<td class="search" colspan="2"> <td class="search" colspan="2">
<input id="search" name="search" type="text" size="21" maxlength="100" onkeyup="listWords(this.value, '')" /><br /> <input id="search" name="search" type="text" size="21" maxlength="100" onkeyup="listWords(this.value, '')" /><br />
<input type="reset" id="clear" style="display:none;" value="Clear" onclick="listWords('', '');" /> <input type="reset" id="clear" style="display:none;" value="Clear" onclick="listWords('', '');" />
</td> </td>
</tr> </tr>
<tr class="search" style="display:none;" > <tr class="search" style="display:none;" >
<td class="search" style="width: 1%; vertical-align: middle;"><input id="highlight" type="checkbox" checked="checked" onclick="highlightCurrent(this.checked, search.value)" /></td> <td class="search" style="width: 1%; vertical-align: middle;"><input id="highlight" type="checkbox" checked="checked" onclick="highlightCurrent(this.checked, search.value)" /></td>
<td class="search" style="width: 99%; padding: 0px; vertical-align: middle;"> Highlight keyword(s) </td> <td class="search" style="width: 99%; padding: 0px; vertical-align: middle;"> Highlight keyword(s) </td>
</tr> </tr>
<tr class="search"> <tr class="search">
<td class="search" colspan="2"> <td class="search" colspan="2">
<table id="result" style="border: 0px;"> <table id="result" style="border: 0px;">
<tr style="display:none"><td></td></tr> <tr style="display:none"><td></td></tr>
</table> </table>
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>
<div class="menu"> <div class="menu">
......
...@@ -5,11 +5,11 @@ and under the Eclipse Public License, Version 1.0 ...@@ -5,11 +5,11 @@ and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group Initial Developer: H2 Group
--> -->
<html><head> <html><head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>H2 Database Engine</title> <title>H2 Database Engine</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" /> <link rel="stylesheet" type="text/css" href="stylesheet.css" />
<script type="text/javascript"> <script type="text/javascript">
location.href = 'main.html'; location.href = 'main.html';
</script> </script>
</head> </head>
<body style="margin: 20px;"> <body style="margin: 20px;">
......
...@@ -60,38 +60,38 @@ To install the software, run the installer or unzip it to a directory of your ch ...@@ -60,38 +60,38 @@ To install the software, run the installer or unzip it to a directory of your ch
After installing, you should get the following directory structure: After installing, you should get the following directory structure:
</p> </p>
<table> <table>
<tr> <tr>
<th>Directory</th> <th>Directory</th>
<th>Contents</th> <th>Contents</th>
</tr> </tr>
<tr> <tr>
<td>bin</td> <td>bin</td>
<td>JAR and batch files</td> <td>JAR and batch files</td>
</tr> </tr>
<tr> <tr>
<td>docs</td> <td>docs</td>
<td>Documentation</td> <td>Documentation</td>
</tr> </tr>
<tr> <tr>
<td>docs/html</td> <td>docs/html</td>
<td>HTML pages</td> <td>HTML pages</td>
</tr> </tr>
<tr> <tr>
<td>docs/javadoc</td> <td>docs/javadoc</td>
<td>Javadoc files</td> <td>Javadoc files</td>
</tr> </tr>
<tr> <tr>
<td>ext</td> <td>ext</td>
<td>External dependencies (downloaded when building)</td> <td>External dependencies (downloaded when building)</td>
</tr> </tr>
<tr> <tr>
<td>service</td> <td>service</td>
<td>Tools to run the database as a Windows Service</td> <td>Tools to run the database as a Windows Service</td>
</tr> </tr>
<tr> <tr>
<td>src</td> <td>src</td>
<td>Source files</td> <td>Source files</td>
</tr> </tr>
</table> </table>
<!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html> <!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html>
......
...@@ -28,7 +28,7 @@ Microsoft .NET technology). The following JaQu code: ...@@ -28,7 +28,7 @@ Microsoft .NET technology). The following JaQu code:
<pre> <pre>
Product p = new Product(); Product p = new Product();
List&lt;Product> soldOutProducts = List&lt;Product> soldOutProducts =
db.from(p).where(p.unitsInStock).is(0).select(); db.from(p).where(p.unitsInStock).is(0).select();
</pre> </pre>
<p> <p>
stands for the SQL statement: stands for the SQL statement:
...@@ -97,130 +97,129 @@ import org.h2.jaqu.Db; ...@@ -97,130 +97,129 @@ import org.h2.jaqu.Db;
import static org.h2.jaqu.Function.*; import static org.h2.jaqu.Function.*;
public class Test { public class Test {
Db db; Db db;
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
new SamplesTest().test(); new SamplesTest().test();
} }
public void test() throws Exception { public void test() throws Exception {
db = Db.open("jdbc:h2:mem:", "sa", "sa"); db = Db.open("jdbc:h2:mem:", "sa", "sa");
db.insertAll(Product.getProductList()); db.insertAll(Product.getProductList());
db.insertAll(Customer.getCustomerList()); db.insertAll(Customer.getCustomerList());
db.insertAll(Order.getOrderList()); db.insertAll(Order.getOrderList());
testLength(); testLength();
testCount(); testCount();
testGroup(); testGroup();
testSelectManyCompoundFrom2(); testSelectManyCompoundFrom2();
testWhereSimple4(); testWhereSimple4();
testSelectSimple2(); testSelectSimple2();
testAnonymousTypes3(); testAnonymousTypes3();
testWhereSimple2(); testWhereSimple2();
testWhereSimple3(); testWhereSimple3();
db.close(); db.close();
} }
private void testWhereSimple2() throws Exception { private void testWhereSimple2() throws Exception {
Product p = new Product(); Product p = new Product();
List&lt;Product> soldOutProducts = List&lt;Product> soldOutProducts =
db.from(p). db.from(p).
where(p.unitsInStock).is(0). where(p.unitsInStock).is(0).
orderBy(p.productId).select(); orderBy(p.productId).select();
} }
private void testWhereSimple3() throws Exception { private void testWhereSimple3() throws Exception {
Product p = new Product(); Product p = new Product();
List&lt;Product> expensiveInStockProducts = List&lt;Product> expensiveInStockProducts =
db.from(p). db.from(p).
where(p.unitsInStock).bigger(0). where(p.unitsInStock).bigger(0).
and(p.unitPrice).bigger(3.0). and(p.unitPrice).bigger(3.0).
orderBy(p.productId).select(); orderBy(p.productId).select();
} }
private void testWhereSimple4() throws Exception {
private void testWhereSimple4() throws Exception { Customer c = new Customer();
Customer c = new Customer(); List&lt;Customer> waCustomers =
List&lt;Customer> waCustomers = db.from(c).
db.from(c). where(c.region).is("WA").
where(c.region).is("WA"). select();
select(); }
}
private void testSelectSimple2() throws Exception {
private void testSelectSimple2() throws Exception { Product p = new Product();
Product p = new Product(); List&lt;String> productNames =
List&lt;String> productNames = db.from(p).
db.from(p). orderBy(p.productId).select(p.productName);
orderBy(p.productId).select(p.productName); List&lt;Product> products = Product.getProductList();
List&lt;Product> products = Product.getProductList(); }
}
public static class ProductPrice {
public static class ProductPrice { public String productName;
public String productName; public String category;
public String category; public Double price;
public Double price; }
}
private void testAnonymousTypes3() throws Exception {
private void testAnonymousTypes3() throws Exception { final Product p = new Product();
final Product p = new Product(); List&lt;ProductPrice> productInfos =
List&lt;ProductPrice> productInfos = db.from(p).orderBy(p.productId).
db.from(p).orderBy(p.productId). select(new ProductPrice() { {
select(new ProductPrice() { { productName = p.productName;
productName = p.productName; category = p.category;
category = p.category; price = p.unitPrice;
price = p.unitPrice; }});
}}); List&lt;Product> products = Product.getProductList();
List&lt;Product> products = Product.getProductList(); }
}
public static class CustOrder {
public static class CustOrder { public String customerId;
public String customerId; public Integer orderId;
public Integer orderId; public BigDecimal total;
public BigDecimal total; }
}
private void testSelectManyCompoundFrom2() throws Exception {
private void testSelectManyCompoundFrom2() throws Exception { final Customer c = new Customer();
final Customer c = new Customer(); final Order o = new Order();
final Order o = new Order(); List&lt;CustOrder> orders =
List&lt;CustOrder> orders = db.from(c).
db.from(c). innerJoin(o).on(c.customerId).is(o.customerId).
innerJoin(o).on(c.customerId).is(o.customerId). where(o.total).smaller(new BigDecimal("500.00")).
where(o.total).smaller(new BigDecimal("500.00")). orderBy(1).
orderBy(1). select(new CustOrder() { {
select(new CustOrder() { { customerId = c.customerId;
customerId = c.customerId; orderId = o.orderId;
orderId = o.orderId; total = o.total;
total = o.total; }});
}}); }
}
private void testLength() throws Exception {
private void testLength() throws Exception { Product p = new Product();
Product p = new Product(); List&lt;Integer> lengths = db.from(p).
List&lt;Integer> lengths = db.from(p). where(length(p.productName)).smaller(10).
where(length(p.productName)).smaller(10). orderBy(1).
orderBy(1). selectDistinct(length(p.productName));
selectDistinct(length(p.productName)); }
}
private void testCount() throws Exception {
private void testCount() throws Exception { long count = db.from(new Product()).selectCount();
long count = db.from(new Product()).selectCount(); }
}
public static class ProductGroup {
public static class ProductGroup { public String category;
public String category; public Long productCount;
public Long productCount; }
}
private void testGroup() throws Exception {
private void testGroup() throws Exception { final Product p = new Product();
final Product p = new Product(); List&lt;ProductGroup> list =
List&lt;ProductGroup> list = db.from(p).
db.from(p). groupBy(p.category).
groupBy(p.category). orderBy(1).
orderBy(1). select(new ProductGroup() { {
select(new ProductGroup() { { category = p.category;
category = p.category; productCount = count();
productCount = count(); }});
}}); }
}
} }
</pre> </pre>
......
...@@ -31,7 +31,7 @@ Welcome to H2, the Java SQL database. The main feature of H2 are: ...@@ -31,7 +31,7 @@ Welcome to H2, the Java SQL database. The main feature of H2 are:
<table style="border: 0px; width: 425px;"> <table style="border: 0px; width: 425px;">
<tr><td style="border: 0px; background-color: #eee;"> <tr><td style="border: 0px; background-color: #eee;">
<table style="border: 0px; margin: 0px 7px 12px 7px;"> <table style="border: 0px; margin: 0px 7px 12px 7px;">
<tr><td style="border: 0px; background-color: #eee;" colspan="2"> <tr><td style="border: 0px; background-color: #eee;" colspan="2">
<h3>Download Beta</h3> <h3>Download Beta</h3>
Version ${version} (${versionDate}): Version ${version} (${versionDate}):
</td></tr> </td></tr>
...@@ -61,15 +61,15 @@ Welcome to H2, the Java SQL database. The main feature of H2 are: ...@@ -61,15 +61,15 @@ Welcome to H2, the Java SQL database. The main feature of H2 are:
Or send an e-mail to: <br /> Or send an e-mail to: <br />
<script type="text/javascript"> <script type="text/javascript">
<!-- <!--
var a = '-support.png'; var a = '-support.png';
var b = 'mail'; var b = 'mail';
var c = 'support '; var c = 'support ';
var d = 'db'; var d = 'db';
var e = 'at '; var e = 'at ';
var f = '.com'; var f = '.com';
var g = 'h2database'; var g = 'h2database';
var alt = 'mail address: ' + d + c + e + g + f + '(without spaces)'; var alt = 'mail address: ' + d + c + e + g + f + '(without spaces)';
document.write('<' + 'a h'+'ref="em' + 'ail:' + d + c + e + g + f +'">' + d + c + e + g + f); document.write('<' + 'a h'+'ref="em' + 'ail:' + d + c + e + g + f +'">' + d + c + e + g + f);
//--> //-->
</script> </script>
</p> </p>
...@@ -106,7 +106,7 @@ Welcome to H2, the Java SQL database. The main feature of H2 are: ...@@ -106,7 +106,7 @@ Welcome to H2, the Java SQL database. The main feature of H2 are:
<tr><td colspan="3" style="border: 0px; background-color: #eee;"> <tr><td colspan="3" style="border: 0px; background-color: #eee;">
<table style="border: 0px; margin: 0px 7px 5px 7px;"> <table style="border: 0px; margin: 0px 7px 5px 7px;">
<tr><td style="border: 0px; background-color: #eee;"> <tr><td style="border: 0px; background-color: #eee;">
<h3>Contribute</h3> <h3>Contribute</h3>
<p> <p>
You can contribute to the development of H2 by sending feedback and bug You can contribute to the development of H2 by sending feedback and bug
......
...@@ -43,7 +43,7 @@ function addHighlight(page, word, count) { ...@@ -43,7 +43,7 @@ function addHighlight(page, word, count) {
if(top.main.document.location.href.indexOf(page) > 0 && top.main.document.body && top.main.document.body.innerHTML) { if(top.main.document.location.href.indexOf(page) > 0 && top.main.document.body && top.main.document.body.innerHTML) {
highlight(); highlight();
} else { } else {
window.setTimeout('addHighlight("'+page+'","'+word+'",'+(count-1)+')', 10); window.setTimeout('addHighlight("'+page+'","'+word+'",'+(count-1)+')', 10);
} }
} }
} }
...@@ -98,47 +98,47 @@ function highlightSearchTerms(body, searchText) { ...@@ -98,47 +98,47 @@ function highlightSearchTerms(body, searchText) {
searchArray = searchText.split(","); searchArray = searchText.split(",");
if (!body || typeof(body.innerHTML) == "undefined") { if (!body || typeof(body.innerHTML) == "undefined") {
return false; return false;
} }
var bodyText = body.innerHTML; var bodyText = body.innerHTML;
for (var i = 0; i < searchArray.length; i++) { for (var i = 0; i < searchArray.length; i++) {
var color = matchColor[i % matchColor.length]; var color = matchColor[i % matchColor.length];
highlightStartTag = "<span "; highlightStartTag = "<span ";
if(i==0) { if(i==0) {
highlightStartTag += "id=firstFound "; highlightStartTag += "id=firstFound ";
} }
highlightStartTag += "style='color:#000000; background-color:#"+color+";'>"; highlightStartTag += "style='color:#000000; background-color:#"+color+";'>";
bodyText = doHighlight(bodyText, searchArray[i], highlightStartTag, highlightEndTag); bodyText = doHighlight(bodyText, searchArray[i], highlightStartTag, highlightEndTag);
} }
return bodyText; return bodyText;
} }
function doHighlight(bodyText, searchTerm, highlightStartTag, highlightEndTag) { function doHighlight(bodyText, searchTerm, highlightStartTag, highlightEndTag) {
if(searchTerm == undefined || searchTerm=="") { if(searchTerm == undefined || searchTerm=="") {
return bodyText; return bodyText;
} }
var newText = ""; var newText = "";
var i = -1; var i = -1;
var lcSearchTerm = searchTerm.toLowerCase(); var lcSearchTerm = searchTerm.toLowerCase();
var lcBodyText = bodyText.toLowerCase(); var lcBodyText = bodyText.toLowerCase();
while (bodyText.length > 0) { while (bodyText.length > 0) {
i = lcBodyText.indexOf(lcSearchTerm, i+1); i = lcBodyText.indexOf(lcSearchTerm, i+1);
if (i < 0) { if (i < 0) {
newText += bodyText; newText += bodyText;
bodyText = ""; bodyText = "";
} else { } else {
// skip anything inside an HTML tag // skip anything inside an HTML tag
if (bodyText.lastIndexOf(">", i) >= bodyText.lastIndexOf("<", i)) { if (bodyText.lastIndexOf(">", i) >= bodyText.lastIndexOf("<", i)) {
// skip anything inside a <script> block // skip anything inside a <script> block
if (lcBodyText.lastIndexOf("/script>", i) >= lcBodyText.lastIndexOf("<script", i)) { if (lcBodyText.lastIndexOf("/script>", i) >= lcBodyText.lastIndexOf("<script", i)) {
newText += bodyText.substring(0, i) + highlightStartTag + bodyText.substr(i, searchTerm.length) + highlightEndTag; newText += bodyText.substring(0, i) + highlightStartTag + bodyText.substr(i, searchTerm.length) + highlightEndTag;
bodyText = bodyText.substr(i + searchTerm.length); bodyText = bodyText.substr(i + searchTerm.length);
lcBodyText = bodyText.toLowerCase(); lcBodyText = bodyText.toLowerCase();
i = -1; i = -1;
}
}
} }
}
} }
} return newText;
return newText;
} }
var drag = false; var drag = false;
......
...@@ -348,7 +348,7 @@ Now convert the .trace.db file using the ConvertTraceFile tool: ...@@ -348,7 +348,7 @@ Now convert the .trace.db file using the ConvertTraceFile tool:
</p> </p>
<pre> <pre>
java -cp h2*.jar org.h2.tools.ConvertTraceFile java -cp h2*.jar org.h2.tools.ConvertTraceFile
-traceFile "~/test.trace.db" -script "~/test.sql" -traceFile "~/test.trace.db" -script "~/test.sql"
</pre> </pre>
<p> <p>
The generated file <code>test.sql</code> will contain the SQL statements as well as the The generated file <code>test.sql</code> will contain the SQL statements as well as the
......
...@@ -59,7 +59,7 @@ Click <span class="button">Start</span>, ...@@ -59,7 +59,7 @@ Click <span class="button">Start</span>,
<img class="screenshot" src="images/quickstart-1.png" alt="screenshot: start H2 Console" /><br /> <img class="screenshot" src="images/quickstart-1.png" alt="screenshot: start H2 Console" /><br />
A new console window appears:<br /> A new console window appears:<br />
<img class="screenshot" src="images/quickstart-2.png" alt="screenshot: H2 Running" /><br /> <img class="screenshot" src="images/quickstart-2.png" alt="screenshot: H2 Running" /><br />
Also, a new browser page should open with the URL <a href="http://localhost:8082">http://localhost:8082</a>. Also, a new browser page should open with the URL <a href="http://localhost:8082">http://localhost:8082</a>.
You may get a security warning from the firewall. If you don't want other computers in the network to access the database You may get a security warning from the firewall. If you don't want other computers in the network to access the database
on your machine, you can let the firewall block these connections. Only local connections are required at this time. on your machine, you can let the firewall block these connections. Only local connections are required at this time.
</p> </p>
...@@ -75,7 +75,7 @@ Select <span class="button">Generic H2</span> and click <span class="button">Con ...@@ -75,7 +75,7 @@ Select <span class="button">Generic H2</span> and click <span class="button">Con
<p> <p>
Click on the <span class="button">Sample SQL Script</span>:<br /> Click on the <span class="button">Sample SQL Script</span>:<br />
<img class="screenshot" src="images/quickstart-4.png" alt="screenshot: click on the sample SQL script" /><br /> <img class="screenshot" src="images/quickstart-4.png" alt="screenshot: click on the sample SQL script" /><br />
The SQL commands appear in the command area.<br /> The SQL commands appear in the command area.<br />
</p> </p>
<h4>Execute</h4> <h4>Execute</h4>
......
...@@ -22,34 +22,34 @@ Initial Developer: H2 Group ...@@ -22,34 +22,34 @@ Initial Developer: H2 Group
<form action="submit" onsubmit="return goFirst();"> <form action="submit" onsubmit="return goFirst();">
<table width="100%" class="search"> <table width="100%" class="search">
<tr class="search"> <tr class="search">
<td class="search" colspan="2"> <td class="search" colspan="2">
<a href="frame.html"><img src="images/language_en.gif" alt="English" /></a> <a href="frame.html"><img src="images/language_en.gif" alt="English" /></a>
<a href="frame_ja.html"><img src="images/language_ja.gif" alt="Japanese" /></a> <a href="frame_ja.html"><img src="images/language_ja.gif" alt="Japanese" /></a>
</td> </td>
</tr> </tr>
<tr class="search"> <tr class="search">
<td class="search" colspan="2"> <td class="search" colspan="2">
<b>Search:</b> <b>Search:</b>
</td> </td>
</tr> </tr>
<tr class="search"> <tr class="search">
<td class="search" colspan="2"> <td class="search" colspan="2">
<input id="search" name="search" type="text" size="21" maxlength="100" onkeyup="listWords(this.value, '')" /><br /> <input id="search" name="search" type="text" size="21" maxlength="100" onkeyup="listWords(this.value, '')" /><br />
<input type="reset" id="clear" style="display:none;" value="Clear" onclick="listWords('', '');" /> <input type="reset" id="clear" style="display:none;" value="Clear" onclick="listWords('', '');" />
</td> </td>
</tr> </tr>
<tr class="search" style="display:none;" > <tr class="search" style="display:none;" >
<td class="search" style="width: 1%; vertical-align: middle;"><input id="highlight" type="checkbox" checked="checked" onclick="highlightCurrent(this.checked, search.value)" /></td> <td class="search" style="width: 1%; vertical-align: middle;"><input id="highlight" type="checkbox" checked="checked" onclick="highlightCurrent(this.checked, search.value)" /></td>
<td class="search" style="width: 99%; padding: 0px; vertical-align: middle;">Highlight keyword(s)</td> <td class="search" style="width: 99%; padding: 0px; vertical-align: middle;">Highlight keyword(s)</td>
</tr> </tr>
<tr class="search"> <tr class="search">
<td class="search" colspan="2"> <td class="search" colspan="2">
<table id="result" style="border: 0px;"> <table id="result" style="border: 0px;">
<tr style="display:none"><td></td></tr> <tr style="display:none"><td></td></tr>
</table> </table>
</td> </td>
</tr> </tr>
</table> </table>
</form> </form>
......
...@@ -67,8 +67,8 @@ Depending on your platform and environment, there are multiple ways to start the ...@@ -67,8 +67,8 @@ Depending on your platform and environment, there are multiple ways to start the
</p> </p>
<table><tr><th>OS</th><th>Start</th></tr> <table><tr><th>OS</th><th>Start</th></tr>
<tr> <tr>
<td>Windows</td> <td>Windows</td>
<td> <td>
Click [Start], [All Programs], [H2], and [H2 Console (Command Line)]<br /> Click [Start], [All Programs], [H2], and [H2 Console (Command Line)]<br />
When using the Sun JDK 1.4 or 1.5, a window with the title 'H2 Console ' should appear. When using the Sun JDK 1.4 or 1.5, a window with the title 'H2 Console ' should appear.
When using the Sun JDK 1.6, an icon will be added to the system tray: When using the Sun JDK 1.6, an icon will be added to the system tray:
...@@ -76,25 +76,25 @@ Depending on your platform and environment, there are multiple ways to start the ...@@ -76,25 +76,25 @@ Depending on your platform and environment, there are multiple ways to start the
If you don't get the window and the system tray icon, If you don't get the window and the system tray icon,
then maybe Java is not installed correctly (in this case, try another way to start the application). then maybe Java is not installed correctly (in this case, try another way to start the application).
A browser window should open and point to the Login page http://localhost:8082). A browser window should open and point to the Login page http://localhost:8082).
</td> </td>
</tr> </tr>
<tr> <tr>
<td>Windows</td> <td>Windows</td>
<td> <td>
Open a file browser, navigate to h2/bin, and double click on h2.bat.<br /> Open a file browser, navigate to h2/bin, and double click on h2.bat.<br />
A console window appears. If there is a problem, you will see an error message A console window appears. If there is a problem, you will see an error message
in this window. A browser window will open and point to the Login page in this window. A browser window will open and point to the Login page
(URL: http://localhost:8082). (URL: http://localhost:8082).
</td> </td>
</tr> </tr>
<tr> <tr>
<td>Any</td> <td>Any</td>
<td> <td>
Open a console window, navigate to the directory 'h2/bin' and type: Open a console window, navigate to the directory 'h2/bin' and type:
<pre> <pre>
java -cp h2*.jar org.h2.tools.Server java -cp h2*.jar org.h2.tools.Server
</pre> </pre>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -251,13 +251,13 @@ and then get a connection. A simple way to do that is using the following code: ...@@ -251,13 +251,13 @@ and then get a connection. A simple way to do that is using the following code:
<pre> <pre>
import java.sql.*; import java.sql.*;
public class Test { public class Test {
public static void main(String[] a) public static void main(String[] a)
throws Exception { throws Exception {
Class.forName("org.h2.Driver"); Class.forName("org.h2.Driver");
Connection conn = DriverManager. Connection conn = DriverManager.
getConnection("jdbc:h2:~/test", "sa", ""); getConnection("jdbc:h2:~/test", "sa", "");
// add application code here // add application code here
} }
} }
</pre> </pre>
<p> <p>
...@@ -381,8 +381,8 @@ To enable it, change the following setting in persistence.xml: ...@@ -381,8 +381,8 @@ To enable it, change the following setting in persistence.xml:
</p> </p>
<pre> <pre>
&lt;property &lt;property
name="toplink.target-database" name="toplink.target-database"
value="oracle.toplink.essentials.platform.database.H2Platform"/> value="oracle.toplink.essentials.platform.database.H2Platform"/>
</pre> </pre>
<p> <p>
In old versions of Glassfish, the property name is <code>toplink.platform.class.name</code>. In old versions of Glassfish, the property name is <code>toplink.platform.class.name</code>.
...@@ -428,7 +428,7 @@ add the following snippet to your web.xml file (after context-param and before f ...@@ -428,7 +428,7 @@ add the following snippet to your web.xml file (after context-param and before f
</p> </p>
<pre> <pre>
&lt;listener> &lt;listener>
&lt;listener-class>org.h2.server.web.DbStarter&lt;/listener-class> &lt;listener-class>org.h2.server.web.DbStarter&lt;/listener-class>
&lt;/listener> &lt;/listener>
</pre> </pre>
<p> <p>
...@@ -442,20 +442,20 @@ These options are set just after the display-name and description tag, but befor ...@@ -442,20 +442,20 @@ These options are set just after the display-name and description tag, but befor
</p> </p>
<pre> <pre>
&lt;context-param> &lt;context-param>
&lt;param-name>db.url&lt;/param-name> &lt;param-name>db.url&lt;/param-name>
&lt;param-value>jdbc:h2:~/test&lt;/param-value> &lt;param-value>jdbc:h2:~/test&lt;/param-value>
&lt;/context-param> &lt;/context-param>
&lt;context-param> &lt;context-param>
&lt;param-name>db.user&lt;/param-name> &lt;param-name>db.user&lt;/param-name>
&lt;param-value>sa&lt;/param-value> &lt;param-value>sa&lt;/param-value>
&lt;/context-param> &lt;/context-param>
&lt;context-param> &lt;context-param>
&lt;param-name>db.password&lt;/param-name> &lt;param-name>db.password&lt;/param-name>
&lt;param-value>sa&lt;/param-value> &lt;param-value>sa&lt;/param-value>
&lt;/context-param> &lt;/context-param>
&lt;context-param> &lt;context-param>
&lt;param-name>db.tcpServer&lt;/param-name> &lt;param-name>db.tcpServer&lt;/param-name>
&lt;param-value>-tcpAllowOthers&lt;/param-value> &lt;param-value>-tcpAllowOthers&lt;/param-value>
&lt;/context-param> &lt;/context-param>
</pre> </pre>
<p> <p>
......
...@@ -10,7 +10,7 @@ Initial Developer: H2 Group ...@@ -10,7 +10,7 @@ Initial Developer: H2 Group
H2 Database Engine H2 Database Engine
</title><link rel="stylesheet" type="text/css" href="html/stylesheet.css" /> </title><link rel="stylesheet" type="text/css" href="html/stylesheet.css" />
<script type="text/javascript"> <script type="text/javascript">
location.href = 'html/main.html'; location.href = 'html/main.html';
</script> </script>
</head> </head>
<body style="margin: 20px;"> <body style="margin: 20px;">
......
...@@ -14,9 +14,9 @@ Initial Developer: H2 Group ...@@ -14,9 +14,9 @@ Initial Developer: H2 Group
<body> <body>
<table style="width: 100%; height: 100%; border: 0px;"> <table style="width: 100%; height: 100%; border: 0px;">
<tr style="border:0px; border-left:1px solid #aca899;"> <tr style="border:0px; border-left:1px solid #aca899;">
<td style="border:0px; border-left:1px solid #aca899;"> <td style="border:0px; border-left:1px solid #aca899;">
<div style="margin:10px;"> <div style="margin:10px;">
<div class="menu"> <div class="menu">
......
...@@ -13,9 +13,9 @@ Initial Developer: H2 Group ...@@ -13,9 +13,9 @@ Initial Developer: H2 Group
</head> </head>
<body> <body>
<table style="width: 100%; height: 100%; border: 0px;"> <table style="width: 100%; height: 100%; border: 0px;">
<tr style="border:0px; border-left:1px solid #aca899;"> <tr style="border:0px; border-left:1px solid #aca899;">
<td style="border:0px; border-left:1px solid #aca899;"> <td style="border:0px; border-left:1px solid #aca899;">
<div style="margin:10px;"> <div style="margin:10px;">
<h1>API Overview</h1> <h1>API Overview</h1>
......
...@@ -878,73 +878,79 @@ Description ...@@ -878,73 +878,79 @@ Description
AES-128 AES-128
@advanced_1293_td @advanced_1293_td
A block encryption algorithm. See also: <a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">Wikipedia: AES</a> A block encryption algorithm. See also: <a
href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">Wikipedia: AES</a>
@advanced_1294_td @advanced_1294_td
Birthday Paradox Birthday Paradox
@advanced_1295_td @advanced_1295_td
Describes the higher than expected probability that two persons in a room have the same birthday. Also valid for randomly generated UUIDs. See also: <a href="http://en.wikipedia.org/wiki/Birthday_paradox">Wikipedia: Birthday Paradox</a> Describes the higher than expected probability that two persons in a room have the same birthday. Also valid for randomly generated UUIDs. See also: <a
href="http://en.wikipedia.org/wiki/Birthday_paradox">Wikipedia: Birthday Paradox</a>
@advanced_1296_td @advanced_1296_td
Digest Digest
@advanced_1297_td @advanced_1297_td
Protocol to protect a password (but not to protect data). See also: <a href="http://www.faqs.org/rfcs/rfc2617.html">RFC 2617: HTTP Digest Access Authentication</a> Protocol to protect a password (but not to protect data). See also: <a href="http://www.faqs.org/rfcs/rfc2617.html">RFC 2617: HTTP Digest Access Authentication</a>
@advanced_1298_td @advanced_1298_td
GCJ GCJ
@advanced_1299_td @advanced_1299_td
Compiler for Java. <a href="http://gcc.gnu.org/java">GNU Compiler for the Java</a> and <a href="http://www.dobysoft.com/products/nativej">NativeJ (commercial)</a> Compiler for Java. <a href="http://gcc.gnu.org/java">GNU Compiler for the Java</a> and <a
href="http://www.dobysoft.com/products/nativej">NativeJ (commercial)</a>
@advanced_1300_td @advanced_1300_td
HTTPS HTTPS
@advanced_1301_td @advanced_1301_td
A protocol to provide security to HTTP connections. See also: <a href="http://www.ietf.org/rfc/rfc2818.txt">RFC 2818: HTTP Over TLS</a> A protocol to provide security to HTTP connections. See also: <a href="http://www.ietf.org/rfc/rfc2818.txt">RFC 2818: HTTP Over TLS</a>
@advanced_1302_td @advanced_1302_td
Modes of Operation Modes of Operation
@advanced_1303_a @advanced_1303_a
Wikipedia: Block cipher modes of operation Wikipedia: Block cipher modes of operation
@advanced_1304_td @advanced_1304_td
Salt Salt
@advanced_1305_td @advanced_1305_td
Random number to increase the security of passwords. See also: <a href="http://en.wikipedia.org/wiki/Key_derivation_function">Wikipedia: Key derivation function</a> Random number to increase the security of passwords. See also: <a href="http://en.wikipedia.org/wiki/Key_derivation_function">Wikipedia: Key derivation function</a>
@advanced_1306_td @advanced_1306_td
SHA-256 SHA-256
@advanced_1307_td @advanced_1307_td
A cryptographic one-way hash function. See also: <a href="http://en.wikipedia.org/wiki/SHA_family">Wikipedia: SHA hash functions</a> A cryptographic one-way hash function. See also: <a
href="http://en.wikipedia.org/wiki/SHA_family">Wikipedia: SHA hash functions</a>
@advanced_1308_td @advanced_1308_td
SQL Injection SQL Injection
@advanced_1309_td @advanced_1309_td
A security vulnerability where an application generates SQL statements with embedded user input. See also: <a href="http://en.wikipedia.org/wiki/SQL_injection">Wikipedia: SQL Injection</a> A security vulnerability where an application generates SQL statements with embedded user input. See also: <a
href="http://en.wikipedia.org/wiki/SQL_injection">Wikipedia: SQL Injection</a>
@advanced_1310_td @advanced_1310_td
Watermark Attack Watermark Attack
@advanced_1311_td @advanced_1311_td
Security problem of certain encryption programs where the existence of certain data can be proven without decrypting. For more information, search in the internet for 'watermark attack cryptoloop' Security problem of certain encryption programs where the existence of certain data can be proven without decrypting. For more information, search in the internet for 'watermark attack cryptoloop'
@advanced_1312_td @advanced_1312_td
SSL/TLS SSL/TLS
@advanced_1313_td @advanced_1313_td
Secure Sockets Layer / Transport Layer Security. See also: <a href="http://java.sun.com/products/jsse/">Java Secure Socket Extension (JSSE)</a> Secure Sockets Layer / Transport Layer Security. See also: <a href="http://java.sun.com/products/jsse/">Java Secure Socket Extension (JSSE)</a>
@advanced_1314_td @advanced_1314_td
XTEA XTEA
@advanced_1315_td @advanced_1315_td
A block encryption algorithm. See also: <a href="http://en.wikipedia.org/wiki/XTEA">Wikipedia: XTEA</a> A block encryption algorithm. See also: <a
href="http://en.wikipedia.org/wiki/XTEA">Wikipedia: XTEA</a>
@build_1000_h1 @build_1000_h1
Build Build
...@@ -1904,7 +1910,7 @@ Databases in zip files: large queries are now supported. Temp files are created ...@@ -1904,7 +1910,7 @@ Databases in zip files: large queries are now supported. Temp files are created
Invalid inline views threw confusing SQL exceptions. Invalid inline views threw confusing SQL exceptions.
@changelog_1261_li @changelog_1261_li
The Japanese translation of the error messages and the H2 Console has been improved. Thanks a lot to Masahiro IKEMOTO. The Japanese translation of the error messages and the H2 Console has been improved. Thanks a lot to Masahiro IKEMOTO.
@changelog_1262_li @changelog_1262_li
Optimization for MIN() and MAX() when using MVCC. Optimization for MIN() and MAX() when using MVCC.
...@@ -4154,7 +4160,7 @@ In this example, the password is hard code in the application, which is not secu ...@@ -4154,7 +4160,7 @@ In this example, the password is hard code in the application, which is not secu
Passing the User Name and/or Password in the URL Passing the User Name and/or Password in the URL
@features_1563_p @features_1563_p
Instead of passing the user name as a separate parameter as in <code>Connection conn = DriverManager. getConnection("jdbc:h2:~/test", "sa", "123");</code> the user name (and/or password) can be supplied in the URL itself: <code>Connection conn = DriverManager. getConnection("jdbc:h2:~/test;USER=sa;PASSWORD=123");</code> The settings in the URL override the settings passed as a separate parameter. Instead of passing the user name as a separate parameter as in <code>Connection conn = DriverManager. getConnection("jdbc:h2:~/test", "sa", "123");</code> the user name (and/or password) can be supplied in the URL itself: <code>Connection conn = DriverManager. getConnection("jdbc:h2:~/test;USER=sa;PASSWORD=123");</code> The settings in the URL override the settings passed as a separate parameter.
@features_1564_h2 @features_1564_h2
User-Defined Functions and Stored Procedures User-Defined Functions and Stored Procedures
...@@ -4784,13 +4790,13 @@ means having the right to grant, to the maximum extent possible, whether at the ...@@ -4784,13 +4790,13 @@ means having the right to grant, to the maximum extent possible, whether at the
1.9. "Modifications" 1.9. "Modifications"
@license_1033_p @license_1033_p
means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is:
@license_1034_p @license_1034_p
1.9.a. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. 1.9.a. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications.
@license_1035_p @license_1035_p
1.9.b. Any new file that contains any part of the Original Code or previous Modifications. 1.9.b. Any new file that contains any part of the Original Code or previous Modifications.
@license_1036_b @license_1036_b
1.10. "Original Code" 1.10. "Original Code"
......
...@@ -880,73 +880,79 @@ SSL/TLS 接続 ...@@ -880,73 +880,79 @@ SSL/TLS 接続
AES-128 AES-128
@advanced_1293_td @advanced_1293_td
ブロック暗号化アルゴリズム。こちらもご覧下さい:<a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">Wikipedia: AES</a> #A block encryption algorithm. See also: <a
href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">Wikipedia: AES</a>
@advanced_1294_td @advanced_1294_td
Birthday Paradox Birthday Paradox
@advanced_1295_td @advanced_1295_td
部屋にいる二人が同じ誕生日の可能性が期待された以上に高いということを説明する。 また、有効なランダムに生成されたUUID。こちらもご覧下さい:<a href="http://en.wikipedia.org/wiki/Birthday_paradox">Wikipedia: Birthday Paradox</a> #Describes the higher than expected probability that two persons in a room have the same birthday. Also valid for randomly generated UUIDs. See also: <a
href="http://en.wikipedia.org/wiki/Birthday_paradox">Wikipedia: Birthday Paradox</a>
@advanced_1296_td @advanced_1296_td
Digest Digest
@advanced_1297_td @advanced_1297_td
パスワードを保護するプロトコル (データは保護しません)。こちらもご覧下さい:<a href="http://www.faqs.org/rfcs/rfc2617.html">RFC 2617: HTTP Digest Access Authentication</a> #Protocol to protect a password (but not to protect data). See also: <a href="http://www.faqs.org/rfcs/rfc2617.html">RFC 2617: HTTP Digest Access Authentication</a>
@advanced_1298_td @advanced_1298_td
GCJ GCJ
@advanced_1299_td @advanced_1299_td
#Compiler for Java. <a href="http://gcc.gnu.org/java">GNU Compiler for the Java</a> and <a href="http://www.dobysoft.com/products/nativej">NativeJ (commercial)</a> #Compiler for Java. <a href="http://gcc.gnu.org/java">GNU Compiler for the Java</a> and <a
href="http://www.dobysoft.com/products/nativej">NativeJ (commercial)</a>
@advanced_1300_td @advanced_1300_td
HTTPS HTTPS
@advanced_1301_td @advanced_1301_td
セキュリティをHTTP接続に提供するプロトコル。こちらもご覧下さい: <a href="http://www.ietf.org/rfc/rfc2818.txt">RFC 2818: HTTP Over TLS</a> #A protocol to provide security to HTTP connections. See also: <a href="http://www.ietf.org/rfc/rfc2818.txt">RFC 2818: HTTP Over TLS</a>
@advanced_1302_td @advanced_1302_td
Modes of Operation Modes of Operation
@advanced_1303_a @advanced_1303_a
Wikipedia: Block cipher modes of operation #Wikipedia: Block cipher modes of operation
@advanced_1304_td @advanced_1304_td
Salt Salt
@advanced_1305_td @advanced_1305_td
パスワードのセキュリティを増大する乱数。こちらもご覧下さい: <a href="http://en.wikipedia.org/wiki/Key_derivation_function">Wikipedia: Key derivation function</a> #Random number to increase the security of passwords. See also: <a href="http://en.wikipedia.org/wiki/Key_derivation_function">Wikipedia: Key derivation function</a>
@advanced_1306_td @advanced_1306_td
SHA-256 SHA-256
@advanced_1307_td @advanced_1307_td
暗号化の一方方向のハッシュ関数。こちらもご覧下さい:<a href="http://en.wikipedia.org/wiki/SHA_family">Wikipedia: SHA hash functions</a> #A cryptographic one-way hash function. See also: <a
href="http://en.wikipedia.org/wiki/SHA_family">Wikipedia: SHA hash functions</a>
@advanced_1308_td @advanced_1308_td
SQLインジェクション SQLインジェクション
@advanced_1309_td @advanced_1309_td
組み込みのユーザー入力でアプリケーションがSQLステートメントを生成するセキュリティ脆弱性 こちらもご覧下さい:<a href="http://en.wikipedia.org/wiki/SQL_injection">Wikipedia: SQL Injection</a> #A security vulnerability where an application generates SQL statements with embedded user input. See also: <a
href="http://en.wikipedia.org/wiki/SQL_injection">Wikipedia: SQL Injection</a>
@advanced_1310_td @advanced_1310_td
Watermark Attack (透かし攻撃) Watermark Attack (透かし攻撃)
@advanced_1311_td @advanced_1311_td
復号化することなくあるデータの存在を証明できる、ある暗号化プログラムのセキュリティ問題。 詳細は、インターネットで "watermark attack cryptoloop" を検索して下さい。 #Security problem of certain encryption programs where the existence of certain data can be proven without decrypting. For more information, search in the internet for 'watermark attack cryptoloop'
@advanced_1312_td @advanced_1312_td
SSL/TLS SSL/TLS
@advanced_1313_td @advanced_1313_td
Secure Sockets Layer / Transport Layer Security。こちらもご覧下さい: <a href="http://java.sun.com/products/jsse/">Java Secure Socket Extension (JSSE)</a> #Secure Sockets Layer / Transport Layer Security. See also: <a href="http://java.sun.com/products/jsse/">Java Secure Socket Extension (JSSE)</a>
@advanced_1314_td @advanced_1314_td
XTEA XTEA
@advanced_1315_td @advanced_1315_td
ブロック暗号化アルゴリズム。こちらもご覧下さい: <a href="http://en.wikipedia.org/wiki/XTEA">Wikipedia: XTEA</a> #A block encryption algorithm. See also: <a
href="http://en.wikipedia.org/wiki/XTEA">Wikipedia: XTEA</a>
@build_1000_h1 @build_1000_h1
ビルド ビルド
...@@ -1906,7 +1912,7 @@ Centralリポジトリの利用 ...@@ -1906,7 +1912,7 @@ Centralリポジトリの利用
#Invalid inline views threw confusing SQL exceptions. #Invalid inline views threw confusing SQL exceptions.
@changelog_1261_li @changelog_1261_li
#The Japanese translation of the error messages and the H2 Console has been improved. Thanks a lot to Masahiro IKEMOTO. #The Japanese translation of the error messages and the H2 Console has been improved. Thanks a lot to Masahiro IKEMOTO.
@changelog_1262_li @changelog_1262_li
#Optimization for MIN() and MAX() when using MVCC. #Optimization for MIN() and MAX() when using MVCC.
...@@ -4156,7 +4162,7 @@ Java Stringは不変のオブジェクトであり、アプリケーションに ...@@ -4156,7 +4162,7 @@ Java Stringは不変のオブジェクトであり、アプリケーションに
ユーザー名 と (または) パスワードをURLで認証する ユーザー名 と (または) パスワードをURLで認証する
@features_1563_p @features_1563_p
ユーザー名を <code>Connection conn = DriverManager. getConnection("jdbc:h2:~/test", "sa", "123");</code> のように切り離されたパラメータとして認証する代わりに、URLそのもので <code>Connection conn = DriverManager. getConnection("jdbc:h2:~/test;USER=sa;PASSWORD=123");</code> ユーザー名 (と (または) パスワード)を提供することができます。URL内の設定は、切り離されたパラメータとして認証させる設定より優先されます。 #Instead of passing the user name as a separate parameter as in <code>Connection conn = DriverManager. getConnection("jdbc:h2:~/test", "sa", "123");</code> the user name (and/or password) can be supplied in the URL itself: <code>Connection conn = DriverManager. getConnection("jdbc:h2:~/test;USER=sa;PASSWORD=123");</code> The settings in the URL override the settings passed as a separate parameter.
@features_1564_h2 @features_1564_h2
ユーザー定義の関数とストアドプロシージャ ユーザー定義の関数とストアドプロシージャ
...@@ -4786,13 +4792,13 @@ Sourceファイル ...@@ -4786,13 +4792,13 @@ Sourceファイル
#1.9. "Modifications" #1.9. "Modifications"
@license_1033_p @license_1033_p
#means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: #means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is:
@license_1034_p @license_1034_p
#1.9.a. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. #1.9.a. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications.
@license_1035_p @license_1035_p
#1.9.b. Any new file that contains any part of the Original Code or previous Modifications. #1.9.b. Any new file that contains any part of the Original Code or previous Modifications.
@license_1036_b @license_1036_b
#1.10. "Original Code" #1.10. "Original Code"
......
...@@ -291,29 +291,29 @@ advanced_1289_h2=Glossary and Links ...@@ -291,29 +291,29 @@ advanced_1289_h2=Glossary and Links
advanced_1290_th=Term advanced_1290_th=Term
advanced_1291_th=Description advanced_1291_th=Description
advanced_1292_td=AES-128 advanced_1292_td=AES-128
advanced_1293_td=A block encryption algorithm. See also\: <a href\="http\://en.wikipedia.org/wiki/Advanced_Encryption_Standard">Wikipedia\: AES</a> advanced_1293_td=A block encryption algorithm. See also\: <a\n href\="http\://en.wikipedia.org/wiki/Advanced_Encryption_Standard">Wikipedia\: AES</a>
advanced_1294_td=Birthday Paradox advanced_1294_td=Birthday Paradox
advanced_1295_td=Describes the higher than expected probability that two persons in a room have the same birthday. Also valid for randomly generated UUIDs. See also\: <a href\="http\://en.wikipedia.org/wiki/Birthday_paradox">Wikipedia\: Birthday Paradox</a> advanced_1295_td=Describes the higher than expected probability that two persons in a room have the same birthday. Also valid for randomly generated UUIDs. See also\: <a\n href\="http\://en.wikipedia.org/wiki/Birthday_paradox">Wikipedia\: Birthday Paradox</a>
advanced_1296_td=Digest advanced_1296_td=Digest
advanced_1297_td=Protocol to protect a password (but not to protect data). See also\: <a href\="http\://www.faqs.org/rfcs/rfc2617.html">RFC 2617\: HTTP Digest Access Authentication</a> advanced_1297_td=Protocol to protect a password (but not to protect data). See also\: <a href\="http\://www.faqs.org/rfcs/rfc2617.html">RFC 2617\: HTTP Digest Access Authentication</a>
advanced_1298_td=GCJ advanced_1298_td=GCJ
advanced_1299_td=Compiler for Java. <a href\="http\://gcc.gnu.org/java">GNU Compiler for the Java</a> and <a href\="http\://www.dobysoft.com/products/nativej">NativeJ (commercial)</a> advanced_1299_td=Compiler for Java. <a href\="http\://gcc.gnu.org/java">GNU Compiler for the Java</a> and <a\n href\="http\://www.dobysoft.com/products/nativej">NativeJ (commercial)</a>
advanced_1300_td=HTTPS advanced_1300_td=HTTPS
advanced_1301_td=A protocol to provide security to HTTP connections. See also\: <a href\="http\://www.ietf.org/rfc/rfc2818.txt">RFC 2818\: HTTP Over TLS</a> advanced_1301_td=A protocol to provide security to HTTP connections. See also\: <a href\="http\://www.ietf.org/rfc/rfc2818.txt">RFC 2818\: HTTP Over TLS</a>
advanced_1302_td=Modes of Operation advanced_1302_td=Modes of Operation
advanced_1303_a=Wikipedia\: Block cipher modes of operation advanced_1303_a=Wikipedia\: Block cipher modes of operation
advanced_1304_td=Salt advanced_1304_td=Salt
advanced_1305_td=Random number to increase the security of passwords. See also\: <a href\="http\://en.wikipedia.org/wiki/Key_derivation_function">Wikipedia\: Key derivation function</a> advanced_1305_td=Random number to increase the security of passwords. See also\: <a href\="http\://en.wikipedia.org/wiki/Key_derivation_function">Wikipedia\: Key derivation function</a>
advanced_1306_td=SHA-256 advanced_1306_td=SHA-256
advanced_1307_td=A cryptographic one-way hash function. See also\: <a href\="http\://en.wikipedia.org/wiki/SHA_family">Wikipedia\: SHA hash functions</a> advanced_1307_td=A cryptographic one-way hash function. See also\: <a\n href\="http\://en.wikipedia.org/wiki/SHA_family">Wikipedia\: SHA hash functions</a>
advanced_1308_td=SQL Injection advanced_1308_td=SQL Injection
advanced_1309_td=A security vulnerability where an application generates SQL statements with embedded user input. See also\: <a href\="http\://en.wikipedia.org/wiki/SQL_injection">Wikipedia\: SQL Injection</a> advanced_1309_td=A security vulnerability where an application generates SQL statements with embedded user input. See also\: <a\n href\="http\://en.wikipedia.org/wiki/SQL_injection">Wikipedia\: SQL Injection</a>
advanced_1310_td=Watermark Attack advanced_1310_td=Watermark Attack
advanced_1311_td=Security problem of certain encryption programs where the existence of certain data can be proven without decrypting. For more information, search in the internet for 'watermark attack cryptoloop' advanced_1311_td=Security problem of certain encryption programs where the existence of certain data can be proven without decrypting. For more information, search in the internet for 'watermark attack cryptoloop'
advanced_1312_td=SSL/TLS advanced_1312_td=SSL/TLS
advanced_1313_td=Secure Sockets Layer / Transport Layer Security. See also\: <a href\="http\://java.sun.com/products/jsse/">Java Secure Socket Extension (JSSE)</a> advanced_1313_td=Secure Sockets Layer / Transport Layer Security. See also\: <a href\="http\://java.sun.com/products/jsse/">Java Secure Socket Extension (JSSE)</a>
advanced_1314_td=XTEA advanced_1314_td=XTEA
advanced_1315_td=A block encryption algorithm. See also\: <a href\="http\://en.wikipedia.org/wiki/XTEA">Wikipedia\: XTEA</a> advanced_1315_td=A block encryption algorithm. See also\: <a\n href\="http\://en.wikipedia.org/wiki/XTEA">Wikipedia\: XTEA</a>
build_1000_h1=Build build_1000_h1=Build
build_1001_a=Portability build_1001_a=Portability
build_1002_a=Environment build_1002_a=Environment
...@@ -633,7 +633,7 @@ changelog_1257_li=The jar file is now about 10% smaller because the variable deb ...@@ -633,7 +633,7 @@ changelog_1257_li=The jar file is now about 10% smaller because the variable deb
changelog_1258_li=Added shell scripts run.sh and build.sh. chmod +x is required, but otherwise it should work. Feedback or improvements are welcome\! changelog_1258_li=Added shell scripts run.sh and build.sh. chmod +x is required, but otherwise it should work. Feedback or improvements are welcome\!
changelog_1259_li=Databases in zip files\: large queries are now supported. Temp files are created in the temp directory if required. The documentation how to create the zip file has been corrected. changelog_1259_li=Databases in zip files\: large queries are now supported. Temp files are created in the temp directory if required. The documentation how to create the zip file has been corrected.
changelog_1260_li=Invalid inline views threw confusing SQL exceptions. changelog_1260_li=Invalid inline views threw confusing SQL exceptions.
changelog_1261_li=The Japanese translation of the error messages and the H2 Console has been improved. Thanks a lot to Masahiro IKEMOTO. changelog_1261_li=The Japanese translation of the error messages and the H2 Console has been improved. Thanks a lot to Masahiro IKEMOTO.
changelog_1262_li=Optimization for MIN() and MAX() when using MVCC. changelog_1262_li=Optimization for MIN() and MAX() when using MVCC.
changelog_1263_li=To protect against remote brute force password attacks, the delay after each unsuccessful login now gets double as long. New system properties h2.delayWrongPasswordMin and h2.delayWrongPasswordMax. changelog_1263_li=To protect against remote brute force password attacks, the delay after each unsuccessful login now gets double as long. New system properties h2.delayWrongPasswordMin and h2.delayWrongPasswordMax.
changelog_1264_li=After setting the query timeout and then resetting it, the next query would still timeout. Fixed. changelog_1264_li=After setting the query timeout and then resetting it, the next query would still timeout. Fixed.
...@@ -1383,7 +1383,7 @@ features_1559_p=An attacker might have access to the swap file of the operating ...@@ -1383,7 +1383,7 @@ features_1559_p=An attacker might have access to the swap file of the operating
features_1560_p=This database supports using char arrays instead of String to pass user and file passwords. The following code can be used to do that\: features_1560_p=This database supports using char arrays instead of String to pass user and file passwords. The following code can be used to do that\:
features_1561_p=In this example, the password is hard code in the application, which is not secure of course. However, Java Swing supports a way to get passwords using a char array (JPasswordField). features_1561_p=In this example, the password is hard code in the application, which is not secure of course. However, Java Swing supports a way to get passwords using a char array (JPasswordField).
features_1562_h3=Passing the User Name and/or Password in the URL features_1562_h3=Passing the User Name and/or Password in the URL
features_1563_p=Instead of passing the user name as a separate parameter as in <code>Connection conn \= DriverManager. getConnection("jdbc\:h2\:~/test", "sa", "123");</code> the user name (and/or password) can be supplied in the URL itself\: <code>Connection conn \= DriverManager. getConnection("jdbc\:h2\:~/test;USER\=sa;PASSWORD\=123");</code> The settings in the URL override the settings passed as a separate parameter. features_1563_p=Instead of passing the user name as a separate parameter as in <code>Connection conn \= DriverManager. getConnection("jdbc\:h2\:~/test", "sa", "123");</code> the user name (and/or password) can be supplied in the URL itself\: <code>Connection conn \= DriverManager. getConnection("jdbc\:h2\:~/test;USER\=sa;PASSWORD\=123");</code> The settings in the URL override the settings passed as a separate parameter.
features_1564_h2=User-Defined Functions and Stored Procedures features_1564_h2=User-Defined Functions and Stored Procedures
features_1565_p=In addition to the built-in functions, this database supports user-defined Java functions. In this database, Java functions can be used as stored procedures as well. A function must be declared (registered) before it can be used. Only static Java methods are supported; both the class and the method must be public. Example Java method\: features_1565_p=In addition to the built-in functions, this database supports user-defined Java functions. In this database, Java functions can be used as stored procedures as well. A function must be declared (registered) before it can be used. Only static Java methods are supported; both the class and the method must be public. Example Java method\:
features_1566_p=The Java function must be registered in the database by calling CREATE ALIAS\: features_1566_p=The Java function must be registered in the database by calling CREATE ALIAS\:
...@@ -1593,9 +1593,9 @@ license_1029_p=means this document. ...@@ -1593,9 +1593,9 @@ license_1029_p=means this document.
license_1030_b=1.8.1. "Licensable" license_1030_b=1.8.1. "Licensable"
license_1031_p=means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. license_1031_p=means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.
license_1032_b=1.9. "Modifications" license_1032_b=1.9. "Modifications"
license_1033_p=means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is\: license_1033_p=means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is\:
license_1034_p=1.9.a. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. license_1034_p=1.9.a. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications.
license_1035_p=1.9.b. Any new file that contains any part of the Original Code or previous Modifications. license_1035_p=1.9.b. Any new file that contains any part of the Original Code or previous Modifications.
license_1036_b=1.10. "Original Code" license_1036_b=1.10. "Original Code"
license_1037_p=means Source Code of computer software code which is described in the Source Code notice required by <a href\="\#exhibit-a">Exhibit A</a> as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. license_1037_p=means Source Code of computer software code which is described in the Source Code notice required by <a href\="\#exhibit-a">Exhibit A</a> as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License.
license_1038_b=1.10.1. "Patent Claims" license_1038_b=1.10.1. "Patent Claims"
......
差异被折叠。
<project> <project>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.h2database</groupId> <groupId>com.h2database</groupId>
<artifactId>h2</artifactId> <artifactId>h2</artifactId>
<version>@version@</version> <version>@version@</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>H2 Database Engine</name> <name>H2 Database Engine</name>
<url>http://www.h2database.com</url> <url>http://www.h2database.com</url>
<description>H2 Database Engine</description> <description>H2 Database Engine</description>
<licenses> <licenses>
<license> <license>
<name>The H2 License, Version 1.0</name> <name>The H2 License, Version 1.0</name>
......
...@@ -710,7 +710,7 @@ public class Parser { ...@@ -710,7 +710,7 @@ public class Parser {
column.columnName = readColumnIdentifier(); column.columnName = readColumnIdentifier();
columns.add(column); columns.add(column);
if (readIf("ASC")) { if (readIf("ASC")) {
// ignore // ignore
} else if (readIf("DESC")) { } else if (readIf("DESC")) {
column.sortType = SortOrder.DESCENDING; column.sortType = SortOrder.DESCENDING;
} }
......
...@@ -48,7 +48,7 @@ public class LinkedIndex extends BaseIndex { ...@@ -48,7 +48,7 @@ public class LinkedIndex extends BaseIndex {
private boolean isNull(Value v) { private boolean isNull(Value v) {
return v == null || v == ValueNull.INSTANCE; return v == null || v == ValueNull.INSTANCE;
} }
public void add(Session session, Row row) throws SQLException { public void add(Session session, Row row) throws SQLException {
StringBuffer buff = new StringBuffer("INSERT INTO "); StringBuffer buff = new StringBuffer("INSERT INTO ");
......
...@@ -27,7 +27,7 @@ public class Page { ...@@ -27,7 +27,7 @@ public class Page {
*/ */
public static final int TYPE_DATA_LEAF = 1; public static final int TYPE_DATA_LEAF = 1;
/** /**
* A data node page (never has overflow pages). * A data node page (never has overflow pages).
*/ */
public static final int TYPE_DATA_NODE = 2; public static final int TYPE_DATA_NODE = 2;
......
...@@ -1326,7 +1326,7 @@ public class JdbcConnection extends TraceObject implements Connection { ...@@ -1326,7 +1326,7 @@ public class JdbcConnection extends TraceObject implements Connection {
ResultInterface getGeneratedKeys() throws SQLException { ResultInterface getGeneratedKeys() throws SQLException {
getGeneratedKeys = prepareCommand("CALL IDENTITY()", getGeneratedKeys); getGeneratedKeys = prepareCommand("CALL IDENTITY()", getGeneratedKeys);
return getGeneratedKeys.executeQuery(0, false); return getGeneratedKeys.executeQuery(0, false);
} }
/** /**
* Create a new empty Clob object. * Create a new empty Clob object.
......
...@@ -2668,7 +2668,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat ...@@ -2668,7 +2668,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
* @return DatabaseMetaData.sqlStateSQL99 * @return DatabaseMetaData.sqlStateSQL99
*/ */
//## Java 1.4 begin ## //## Java 1.4 begin ##
public int getSQLStateType() { public int getSQLStateType() {
debugCodeCall("getSQLStateType"); debugCodeCall("getSQLStateType");
return DatabaseMetaData.sqlStateSQL99; return DatabaseMetaData.sqlStateSQL99;
} }
......
...@@ -325,7 +325,7 @@ public class JdbcStatement extends TraceObject implements Statement { ...@@ -325,7 +325,7 @@ public class JdbcStatement extends TraceObject implements Statement {
} }
} }
/** /**
* Gets the fetch direction. * Gets the fetch direction.
* *
* @return FETCH_FORWARD * @return FETCH_FORWARD
......
...@@ -244,7 +244,7 @@ implements XAConnection, XAResource, JdbcConnectionListener ...@@ -244,7 +244,7 @@ implements XAConnection, XAResource, JdbcConnectionListener
list.toArray(result); list.toArray(result);
return result; return result;
} catch (SQLException e) { } catch (SQLException e) {
throw new XAException(XAException.XAER_RMERR); throw new XAException(XAException.XAER_RMERR);
} finally { } finally {
JdbcUtils.closeSilently(stat); JdbcUtils.closeSilently(stat);
} }
......
...@@ -424,7 +424,7 @@ The current user owner must have admin rights. ...@@ -424,7 +424,7 @@ The current user owner must have admin rights.
CREATE LINKED TABLE LINK('org.h2.Driver', 'jdbc:h2:test2', 'sa', 'sa', 'TEST'); CREATE LINKED TABLE LINK('org.h2.Driver', 'jdbc:h2:test2', 'sa', 'sa', 'TEST');
CREATE LINKED TABLE LINK('', 'jdbc:h2:test2', 'sa', 'sa', '(SELECT * FROM TEST WHERE ID>0)'); CREATE LINKED TABLE LINK('', 'jdbc:h2:test2', 'sa', 'sa', '(SELECT * FROM TEST WHERE ID>0)');
CREATE LINKED TABLE LINK('javax.naming.InitialContext', CREATE LINKED TABLE LINK('javax.naming.InitialContext',
'java:comp/env/jdbc/Test', NULL, NULL, '(SELECT * FROM TEST WHERE ID>0)'); 'java:comp/env/jdbc/Test', NULL, NULL, '(SELECT * FROM TEST WHERE ID>0)');
" "
"Commands (DDL)","CREATE ROLE"," "Commands (DDL)","CREATE ROLE","
......
...@@ -39,7 +39,7 @@ public class XTEA implements BlockCipher { ...@@ -39,7 +39,7 @@ public class XTEA implements BlockCipher {
k8 = r[8]; k9 = r[9]; k10 = r[10]; k11 = r[11]; k12 = r[12]; k13 = r[13]; k14 = r[14]; k15 = r[15]; k8 = r[8]; k9 = r[9]; k10 = r[10]; k11 = r[11]; k12 = r[12]; k13 = r[13]; k14 = r[14]; k15 = r[15];
k16 = r[16]; k17 = r[17]; k18 = r[18]; k19 = r[19]; k20 = r[20]; k21 = r[21]; k22 = r[22]; k23 = r[23]; k16 = r[16]; k17 = r[17]; k18 = r[18]; k19 = r[19]; k20 = r[20]; k21 = r[21]; k22 = r[22]; k23 = r[23];
k24 = r[24]; k25 = r[25]; k26 = r[26]; k27 = r[27]; k28 = r[28]; k29 = r[29]; k30 = r[30]; k31 = r[31]; k24 = r[24]; k25 = r[25]; k26 = r[26]; k27 = r[27]; k28 = r[28]; k29 = r[29]; k30 = r[30]; k31 = r[31];
} }
public void encrypt(byte[] bytes, int off, int len) { public void encrypt(byte[] bytes, int off, int len) {
if (SysProperties.CHECK && (len % ALIGN != 0)) { if (SysProperties.CHECK && (len % ALIGN != 0)) {
......
...@@ -121,14 +121,14 @@ as ...@@ -121,14 +121,14 @@ as
select select
t.id*10000 + c.ordinal_position oid, t.id*10000 + c.ordinal_position oid,
t.id attrelid, t.id attrelid,
c.column_name attname, c.column_name attname,
data_type atttypid, data_type atttypid,
-1 attlen, -1 attlen,
c.ordinal_position attnum, c.ordinal_position attnum,
-1 atttypmod, -1 atttypmod,
false attnotnull, false attnotnull,
false attisdropped, false attisdropped,
false atthasdef false atthasdef
from information_schema.tables t, information_schema.columns c from information_schema.tables t, information_schema.columns c
where t.table_name = c.table_name where t.table_name = c.table_name
and t.table_schema = c.table_schema and t.table_schema = c.table_schema
...@@ -136,14 +136,14 @@ union all ...@@ -136,14 +136,14 @@ union all
select select
1000000 + t.id*10000 + c.ordinal_position oid, 1000000 + t.id*10000 + c.ordinal_position oid,
i.id attrelid, i.id attrelid,
c.column_name attname, c.column_name attname,
data_type atttypid, data_type atttypid,
-1 attlen, -1 attlen,
c.ordinal_position attnum, c.ordinal_position attnum,
-1 atttypmod, -1 atttypmod,
false attnotnull, false attnotnull,
false attisdropped, false attisdropped,
false atthasdef false atthasdef
from information_schema.tables t, information_schema.indexes i, information_schema.columns c from information_schema.tables t, information_schema.indexes i, information_schema.columns c
where t.table_name = i.table_name where t.table_name = i.table_name
and t.table_schema = i.table_schema and t.table_schema = i.table_schema
......
...@@ -99,16 +99,18 @@ public class WebServer implements Service { ...@@ -99,16 +99,18 @@ public class WebServer implements Service {
*/ */
private static final long SESSION_TIMEOUT = 30 * 60 * 1000; private static final long SESSION_TIMEOUT = 30 * 60 * 1000;
/* // static {
String[] list = Locale.getISOLanguages(); // String[] list = Locale.getISOLanguages();
for(int i=0; i<list.length; i++) System.out.print(list[i] + " "); // for (int i = 0; i < list.length; i++) {
String lang = new java.util.Locale("hu"). // System.out.print(list[i] + " ");
getDisplayLanguage(new java.util.Locale("hu")); // }
java.util.Locale.CHINESE.getDisplayLanguage( // String lang = new java.util.Locale("hu").
java.util.Locale.CHINESE); // getDisplayLanguage(new java.util.Locale("hu"));
for(int i=0; i<lang.length(); i++) // java.util.Locale.CHINESE.getDisplayLanguage(java.util.Locale.CHINESE);
System.out.println(Integer.toHexString(lang.charAt(i))+" "); // for (int i = 0; i < lang.length(); i++) {
*/ // System.out.println(Integer.toHexString(lang.charAt(i)) + " ");
// }
// }
// private URLClassLoader urlClassLoader; // private URLClassLoader urlClassLoader;
private String driverList; private String driverList;
......
...@@ -28,11 +28,11 @@ Initial Developer: H2 Group ...@@ -28,11 +28,11 @@ Initial Developer: H2 Group
class="icon" alt="${text.toolbar.refresh}" title="${text.toolbar.refresh}" border="1" /></a class="icon" alt="${text.toolbar.refresh}" title="${text.toolbar.refresh}" border="1" /></a
><img src="icon_line.gif" class="iconLine" alt="" ><img src="icon_line.gif" class="iconLine" alt=""
/></td><td class="toolbar"><input type="checkbox" name="autoCommit" value="autoCommit" /></td><td class="toolbar"><input type="checkbox" name="autoCommit" value="autoCommit"
onclick="javascript:if(document.header.autoCommit.checked) onclick="javascript:if(document.header.autoCommit.checked)
top.frames['h2result'].document.location='query.do?jsessionid=${sessionId}&amp;sql=@AUTOCOMMIT+TRUE'; top.frames['h2result'].document.location='query.do?jsessionid=${sessionId}&amp;sql=@AUTOCOMMIT+TRUE';
else else
top.frames['h2result'].document.location='query.do?jsessionid=${sessionId}&amp;sql=@AUTOCOMMIT+FALSE'; top.frames['h2result'].document.location='query.do?jsessionid=${sessionId}&amp;sql=@AUTOCOMMIT+FALSE';
" "
/></td><td class="toolbar">${text.toolbar.autoCommit}&nbsp;</td><td class="toolbar" /></td><td class="toolbar">${text.toolbar.autoCommit}&nbsp;</td><td class="toolbar"
><a href="query.do?jsessionid=${sessionId}&amp;sql=ROLLBACK" target="h2result" ><a href="query.do?jsessionid=${sessionId}&amp;sql=ROLLBACK" target="h2result"
><img src="icon_rollback.gif" ><img src="icon_rollback.gif"
...@@ -47,7 +47,7 @@ Initial Developer: H2 Group ...@@ -47,7 +47,7 @@ Initial Developer: H2 Group
><img src="icon_line.gif" class="iconLine" alt="" ><img src="icon_line.gif" class="iconLine" alt=""
/></td><td class="toolbar">&nbsp;${text.toolbar.maxRows}:&nbsp;</td><td class="toolbar" /></td><td class="toolbar">&nbsp;${text.toolbar.maxRows}:&nbsp;</td><td class="toolbar"
><select name="rowcount" size="1" ><select name="rowcount" size="1"
onchange="javascript:top.frames['h2result'].document.location='query.do?jsessionid=${sessionId}&amp;sql=@SET+MAXROWS+'+header.rowcount.value;" onchange="javascript:top.frames['h2result'].document.location='query.do?jsessionid=${sessionId}&amp;sql=@SET+MAXROWS+'+header.rowcount.value;"
><option value="0">${text.toolbar.all}</option> ><option value="0">${text.toolbar.all}</option>
<option value="10000">10000</option> <option value="10000">10000</option>
<option selected="selected" value="1000">1000</option> <option selected="selected" value="1000">1000</option>
...@@ -72,7 +72,7 @@ Initial Developer: H2 Group ...@@ -72,7 +72,7 @@ Initial Developer: H2 Group
class="icon" alt="${text.toolbar.history}" title="${text.toolbar.history}" border="1" /></a class="icon" alt="${text.toolbar.history}" title="${text.toolbar.history}" border="1" /></a
><img src="icon_line.gif" class="iconLine" alt="" ><img src="icon_line.gif" class="iconLine" alt=""
/></td><td class="toolbar">${text.toolbar.autoComplete}&nbsp;<select name="autoComplete" size="1" /></td><td class="toolbar">${text.toolbar.autoComplete}&nbsp;<select name="autoComplete" size="1"
onchange="javascript:top.frames['h2query'].setAutoComplete(this.value)" onchange="javascript:top.frames['h2query'].setAutoComplete(this.value)"
><option value="0">${text.toolbar.autoComplete.off}</option> ><option value="0">${text.toolbar.autoComplete.off}</option>
<option selected="selected" value="1">${text.toolbar.autoComplete.normal}</option> <option selected="selected" value="1">${text.toolbar.autoComplete.normal}</option>
<option value="2">${text.toolbar.autoComplete.full}</option> <option value="2">${text.toolbar.autoComplete.full}</option>
......
...@@ -13,7 +13,7 @@ Initial Developer: H2 Group ...@@ -13,7 +13,7 @@ Initial Developer: H2 Group
<link rel="stylesheet" type="text/css" href="stylesheet.css" /> <link rel="stylesheet" type="text/css" href="stylesheet.css" />
</head> </head>
<body class="result" onkeyup="auto(event)"> <body class="result" onkeyup="auto(event)">
<!-- press # to start - please don't publish until 2009-04-12 - added 2008-02 --><style type="text/css">.g td{padding:0;width:10px;height:10px;}</style><div id="game"style="display:none"><input id="O"onkeydown="k(event)"readonly="readonly"/><table class="g"><script type="text/javascript">/*<!--*/var L=264,M=new Array(),S,R,P,W,C,D=document,O=D.getElementById("O");function z(){S=R=0;P=17;W=200;C=1;for(i=0;i<L;i++)M[i]=i<253&&(i+1)%12>1?0:8;}function d(){for(i=0;i<L;i++)D.getElementsByTagName("td")[i].style.backgroundColor="#"+"fffff000e00c00a008006004000".substr(3*M[i],3);}function k(e){c=e.keyCode;c?c=c:e.charCode;r=R;p=P;if(c==37)p-=1;if(c==38||c==32)r="AHILMNQBJKCDEOPFRSG".charCodeAt(R)-65;if(c==39)p++;if(c==40)W=10;s(0);if(!t(p,r)){P=p;R=r;s(C);d();s(0);}else s(C);}function f(){setTimeout("f()",W);O.focus();s(0);if(!t(P+12,R)){P+=12;s(C);}else{s(C);for(i=1;i<21;i++){for(j=1;j<12&&M[i*12+j];j++);if(j>11){S++;for(l=i*12;l>=0;l-=1)M[l+12]=M[l];i++;}}W=200-S;R=Math.random()*7&7;C=R+1;if(P<24)z();P=17;}d();O.value=S;}function g(x){return"01<=/012$/01$01=%01<$0<=$0;<$0<H$01</01<$/0<01;</0<=/01;#$0<'+'%/01#/01$%0</01=".charCodeAt(x)-48;}function s(n){for(i=0;i<4;i++)M[P+g(4*R+i)]=n;}function t(x,y){for(i=3;i>=0&&!M[x+g(4*y+i)];i-=1);return i+1;}for(i=0;i<L;i++)D.write("<td>"+((i%12)>10?"<tr>":""));function auto(e){c=e.keyCode;c=c?c:e.charCode;if(c==51){D.getElementById('output').style.display='none';D.getElementById('game').style.display='';z();f();}}/*-->*/</script></table></div> <!-- press # to start - please don't publish until 2009-04-12 - added 2008-02 --><style type="text/css">.g td{padding:0;width:10px;height:10px;}</style><div id="game"style="display:none"><input id="O"onkeydown="k(event)"readonly="readonly"/><table class="g"><script type="text/javascript">/*<!--*/var L=264,M=new Array(),S,R,P,W,C,D=document,O=D.getElementById("O");function z(){S=R=0;P=17;W=200;C=1;for(i=0;i<L;i++)M[i]=i<253&&(i+1)%12>1?0:8;}function d(){for(i=0;i<L;i++)D.getElementsByTagName("td")[i].style.backgroundColor="#"+"fffff000e00c00a008006004000".substr(3*M[i],3);}function k(e){c=e.keyCode;c?c=c:e.charCode;r=R;p=P;if(c==37)p-=1;if(c==38||c==32)r="AHILMNQBJKCDEOPFRSG".charCodeAt(R)-65;if(c==39)p++;if(c==40)W=10;s(0);if(!t(p,r)){P=p;R=r;s(C);d();s(0);}else s(C);}function f(){setTimeout("f()",W);O.focus();s(0);if(!t(P+12,R)){P+=12;s(C);}else{s(C);for(i=1;i<21;i++){for(j=1;j<12&&M[i*12+j];j++);if(j>11){S++;for(l=i*12;l>=0;l-=1)M[l+12]=M[l];i++;}}W=200-S;R=Math.random()*7&7;C=R+1;if(P<24)z();P=17;}d();O.value=S;}function g(x){return("01<=/012$/01$01=%01<$0<=$0;<$0<H$01</01<$/0<01;</0<=/01;#$0<"+"%/01#/01$%0</01=").charCodeAt(x)-48;}function s(n){for(i=0;i<4;i++)M[P+g(4*R+i)]=n;}function t(x,y){for(i=3;i>=0&&!M[x+g(4*y+i)];i-=1);return i+1;}for(i=0;i<L;i++)D.write("<td>"+((i%12)>10?"<tr>":""));function auto(e){c=e.keyCode;c=c?c:e.charCode;if(c==51){D.getElementById('output').style.display='none';D.getElementById('game').style.display='';z();f();}}/*-->*/</script></table></div>
<script type="text/javascript"> <script type="text/javascript">
<!-- <!--
function set(s) { function set(s) {
...@@ -28,25 +28,25 @@ function set(s) { ...@@ -28,25 +28,25 @@ function set(s) {
<table> <table>
<tr><th>${text.helpIcon}</th><th>${text.helpAction}</th></tr> <tr><th>${text.helpIcon}</th><th>${text.helpAction}</th></tr>
<tr> <tr>
<td style="padding:0px"><img src="icon_help.gif" alt="${text.a.help}"/></td> <td style="padding:0px"><img src="icon_help.gif" alt="${text.a.help}"/></td>
<td style="vertical-align: middle;"> <td style="vertical-align: middle;">
${text.helpDisplayThis} ${text.helpDisplayThis}
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="padding:0px"><img src="icon_history.gif" alt="${text.toolbar.history}"/></td> <td style="padding:0px"><img src="icon_history.gif" alt="${text.toolbar.history}"/></td>
<td style="vertical-align: middle;"> <td style="vertical-align: middle;">
${text.helpCommandHistory} ${text.helpCommandHistory}
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="padding:0px"><img src="icon_run.gif" alt="${text.toolbar.run}"/></td> <td style="padding:0px"><img src="icon_run.gif" alt="${text.toolbar.run}"/></td>
<td style="vertical-align: middle;"> <td style="vertical-align: middle;">
${text.helpExecuteCurrent} ${text.helpExecuteCurrent}
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="padding:0px"><img src="icon_disconnect.gif" alt="${text.toolbar.disconnect}"/></td> <td style="padding:0px"><img src="icon_disconnect.gif" alt="${text.toolbar.disconnect}"/></td>
<td style="vertical-align: middle;"> <td style="vertical-align: middle;">
${text.helpDisconnect} ${text.helpDisconnect}
</td> </td>
...@@ -83,4 +83,4 @@ ${text.helpAddDriversText} ...@@ -83,4 +83,4 @@ ${text.helpAddDriversText}
<table id="h2auto" class="autoComp"><tbody></tbody></table> <table id="h2auto" class="autoComp"><tbody></tbody></table>
</body></html> </body></html>
\ No newline at end of file
...@@ -11,7 +11,7 @@ Initial Developer: H2 Group ...@@ -11,7 +11,7 @@ Initial Developer: H2 Group
<title>${text.a.title}</title> <title>${text.a.title}</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" /> <link rel="stylesheet" type="text/css" href="stylesheet.css" />
<script type="text/javascript"> <script type="text/javascript">
location.href = 'login.jsp?jsessionid=${sessionId}'; location.href = 'login.jsp?jsessionid=${sessionId}';
</script> </script>
</head> </head>
<body style="margin: 20px;"> <body style="margin: 20px;">
......
...@@ -23,12 +23,12 @@ Initial Developer: H2 Group ...@@ -23,12 +23,12 @@ Initial Developer: H2 Group
> >
${languageCombo} ${languageCombo}
</select> </select>
&nbsp;&nbsp; <a href="admin.do?jsessionid=${sessionId}">${text.login.goAdmin}</a> &nbsp;&nbsp; <a href="admin.do?jsessionid=${sessionId}">${text.login.goAdmin}</a>
<!-- <!--
--> -->
&nbsp;&nbsp; <a href="tools.jsp?jsessionid=${sessionId}">${text.a.tools}</a> &nbsp;&nbsp; <a href="tools.jsp?jsessionid=${sessionId}">${text.a.tools}</a>
&nbsp;&nbsp; <a href="help.jsp?jsessionid=${sessionId}">${text.a.help}</a> &nbsp;&nbsp; <a href="help.jsp?jsessionid=${sessionId}">${text.a.help}</a>
</p> </p>
<table class="login" cellspacing="0" cellpadding="0"> <table class="login" cellspacing="0" cellpadding="0">
<tr class="login"> <tr class="login">
<th class="login">${text.login.login}</th> <th class="login">${text.login.login}</th>
......
...@@ -105,12 +105,12 @@ function setSelection(element) { ...@@ -105,12 +105,12 @@ function setSelection(element) {
try { try {
var range = document.selection.createRange(); var range = document.selection.createRange();
var copy = range.duplicate(); var copy = range.duplicate();
copy.moveToElementText(element); copy.moveToElementText(element);
copy.setEndPoint('EndToEnd', range); copy.setEndPoint('EndToEnd', range);
element.selectionStart = copy.text.length - range.text.length; element.selectionStart = copy.text.length - range.text.length;
element.selectionEnd = element.selectionStart + range.text.length; element.selectionEnd = element.selectionStart + range.text.length;
} catch (e) { } catch (e) {
element.selectionEnd = element.selectionStart = 0; element.selectionEnd = element.selectionStart = 0;
} }
} }
} }
...@@ -418,13 +418,13 @@ function sendAsyncRequest(url) { ...@@ -418,13 +418,13 @@ function sendAsyncRequest(url) {
req = false; req = false;
} }
} else if(window.ActiveXObject) { } else if(window.ActiveXObject) {
try { try {
req = new ActiveXObject("Msxml2.XMLHTTP"); req = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) { } catch(e) {
try { try {
req = new ActiveXObject("Microsoft.XMLHTTP"); req = new ActiveXObject("Microsoft.XMLHTTP");
} catch(e) { } catch(e) {
req = false; req = false;
} }
} }
} }
......
...@@ -16,8 +16,8 @@ Initial Developer: H2 Group ...@@ -16,8 +16,8 @@ Initial Developer: H2 Group
<body class="result"> <body class="result">
<div id="output"> <div id="output">
${result} ${result}
</div> </div>
<table id="h2auto" class="autoComp"><tbody></tbody></table> <table id="h2auto" class="autoComp"><tbody></tbody></table>
......
...@@ -26,7 +26,7 @@ function initSort() { ...@@ -26,7 +26,7 @@ function initSort() {
if(document.getElementById('editing') != undefined) { if(document.getElementById('editing') != undefined) {
// don't allow sorting while editing // don't allow sorting while editing
return; return;
} }
var tables = document.getElementsByTagName("table"); var tables = document.getElementsByTagName("table");
for (var i=0; i<tables.length; i++) { for (var i=0; i<tables.length; i++) {
table = tables[i]; table = tables[i];
...@@ -172,7 +172,7 @@ function resortTable(link) { ...@@ -172,7 +172,7 @@ function resortTable(link) {
var allSpans = document.getElementsByTagName("span"); var allSpans = document.getElementsByTagName("span");
for (var i=0;i<allSpans.length;i++) { for (var i=0;i<allSpans.length;i++) {
if (allSpans[i].className == 'sortArrow') { if (allSpans[i].className == 'sortArrow') {
// in the same table as us? // in the same table as us?
if (getParent(allSpans[i],"table") == getParent(link,"table")) { if (getParent(allSpans[i],"table") == getParent(link,"table")) {
allSpans[i].innerHTML = '&nbsp;&nbsp;'; allSpans[i].innerHTML = '&nbsp;&nbsp;';
} }
......
...@@ -301,15 +301,15 @@ ShutdownHandler { ...@@ -301,15 +301,15 @@ ShutdownHandler {
// trayIcon.addMouseListener(this); // trayIcon.addMouseListener(this);
trayIcon.getClass(). trayIcon.getClass().
getMethod("addMouseListener", new Class[]{MouseListener.class}). getMethod("addMouseListener", new Class[]{MouseListener.class}).
invoke(trayIcon, new Object[]{this}); invoke(trayIcon, new Object[]{this});
// tray.add(icon); // tray.add(icon);
tray.getClass(). tray.getClass().
getMethod("add", new Class[] { Class.forName("java.awt.TrayIcon") }). getMethod("add", new Class[] { Class.forName("java.awt.TrayIcon") }).
invoke(tray, new Object[] { trayIcon }); invoke(tray, new Object[] { trayIcon });
return true; return true;
} catch (Exception e) { } catch (Exception e) {
return false; return false;
} }
......
...@@ -153,18 +153,18 @@ public class JdbcUtils { ...@@ -153,18 +153,18 @@ public class JdbcUtils {
return ds.getConnection(); return ds.getConnection();
} }
return ds.getConnection(user, password); return ds.getConnection(user, password);
} catch (InstantiationException e) { } catch (InstantiationException e) {
throw Message.convert(e); throw Message.convert(e);
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {
throw Message.convert(e); throw Message.convert(e);
} catch (NamingException e) { } catch (NamingException e) {
throw Message.convert(e); throw Message.convert(e);
} }
//## Java 1.4 end ## //## Java 1.4 end ##
} else { } else {
// Don't know, but maybe it loaded a JDBC Driver // Don't know, but maybe it loaded a JDBC Driver
return DriverManager.getConnection(url, prop); return DriverManager.getConnection(url, prop);
} }
} }
return DriverManager.getConnection(url, prop); return DriverManager.getConnection(url, prop);
} }
......
...@@ -36,6 +36,6 @@ extends HashMap ...@@ -36,6 +36,6 @@ extends HashMap
//## Java 1.4 begin ## //## Java 1.4 begin ##
protected boolean removeEldestEntry(Map.Entry eldest) { protected boolean removeEldestEntry(Map.Entry eldest) {
return size() > size; return size() > size;
} }
//## Java 1.4 end ## //## Java 1.4 end ##
} }
...@@ -272,7 +272,7 @@ public class DataType { ...@@ -272,7 +272,7 @@ public class DataType {
add(Value.BYTES, Types.VARBINARY, "Bytes", add(Value.BYTES, Types.VARBINARY, "Bytes",
createString(false), createString(false),
new String[]{"VARBINARY"}, new String[]{"VARBINARY"},
8 8
); );
add(Value.BYTES, Types.BINARY, "Bytes", add(Value.BYTES, Types.BINARY, "Bytes",
createString(false), createString(false),
......
...@@ -186,7 +186,7 @@ public class ValueLob extends Value { ...@@ -186,7 +186,7 @@ public class ValueLob extends Value {
} }
long inplace = handler.getMaxLengthInplaceLob(); long inplace = handler.getMaxLengthInplaceLob();
if (inplace >= Integer.MAX_VALUE) { if (inplace >= Integer.MAX_VALUE) {
inplace = remaining; inplace = remaining;
} }
long m = compress ? Constants.IO_BUFFER_SIZE_COMPRESS : Constants.IO_BUFFER_SIZE; long m = compress ? Constants.IO_BUFFER_SIZE_COMPRESS : Constants.IO_BUFFER_SIZE;
if (m < remaining && m <= inplace) { if (m < remaining && m <= inplace) {
......
...@@ -20,5 +20,5 @@ public class ShutdownServer { ...@@ -20,5 +20,5 @@ public class ShutdownServer {
*/ */
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
org.h2.tools.Server.shutdownTcpServer("tcp://localhost:9094", "", false); org.h2.tools.Server.shutdownTcpServer("tcp://localhost:9094", "", false);
} }
} }
...@@ -284,7 +284,7 @@ JCR: for each node type, create a table; one 'dynamic' table with parameter; ...@@ -284,7 +284,7 @@ JCR: for each node type, create a table; one 'dynamic' table with parameter;
<link rel="icon" type="image/png" href="/path/image.png"> <link rel="icon" type="image/png" href="/path/image.png">
create a short one page documentation create a short one page documentation
checksum: no need to checksum all data; every 128th byte is enough; checksum: no need to checksum all data; every 128th byte is enough;
but need position+counter but need position+counter
http://blog.flexive.org/2008/12/05/porting-flexive-to-the-h2-database/ http://blog.flexive.org/2008/12/05/porting-flexive-to-the-h2-database/
postgresql generate_series? postgresql generate_series?
...@@ -323,7 +323,7 @@ implemented: ...@@ -323,7 +323,7 @@ implemented:
- small result sets (up to fetch size) - small result sets (up to fetch size)
- throws an error when autocommit is false - throws an error when autocommit is false
- an error is thrown when the connection is lost - an error is thrown when the connection is lost
while looping over large result sets (larger than fetch size) while looping over large result sets (larger than fetch size)
not implemented / not tested not implemented / not tested
- batch updates - batch updates
- ignored in embedded mode - ignored in embedded mode
......
...@@ -488,7 +488,7 @@ public class TestFunctions extends TestBase implements AggregateFunction { ...@@ -488,7 +488,7 @@ public class TestFunctions extends TestBase implements AggregateFunction {
* @return the value * @return the value
*/ */
public static BigDecimal noOp(BigDecimal dec) { public static BigDecimal noOp(BigDecimal dec) {
return dec; return dec;
} }
/** /**
......
...@@ -101,8 +101,8 @@ public class TestMvcc1 extends TestBase { ...@@ -101,8 +101,8 @@ public class TestMvcc1 extends TestBase {
s1.execute("create table b (name varchar(100) not null, a integer, primary key(name), foreign key(a) references a(id))"); s1.execute("create table b (name varchar(100) not null, a integer, primary key(name), foreign key(a) references a(id))");
s1.execute("insert into a(code) values('one')"); s1.execute("insert into a(code) values('one')");
try { try {
s2.execute("insert into b values('un B', 1)"); s2.execute("insert into b values('un B', 1)");
fail(); fail();
} catch (SQLException e) { } catch (SQLException e) {
assertKnownException(e); assertKnownException(e);
} }
......
...@@ -53,30 +53,30 @@ I am sorry to say that, but it looks like a corruption problem. I am very intere ...@@ -53,30 +53,30 @@ I am sorry to say that, but it looks like a corruption problem. I am very intere
- Could you send the full stack trace of the exception including message text? - Could you send the full stack trace of the exception including message text?
- What is your database URL? - What is your database URL?
- You can find out if the database is corrupted when running - You can find out if the database is corrupted when running
SCRIPT TO 'test.sql' SCRIPT TO 'test.sql'
- What version H2 are you using? - What version H2 are you using?
- Did you use multiple connections? - Did you use multiple connections?
- The first workarounds is: append ;RECOVER=1 to the database URL. - The first workarounds is: append ;RECOVER=1 to the database URL.
Does it work when you do this? Does it work when you do this?
- The second workarounds is: delete the index.db file - The second workarounds is: delete the index.db file
(it is re-created automatically) and try again. Does it work when you do this? (it is re-created automatically) and try again. Does it work when you do this?
- The third workarounds is: use the tool org.h2.tools.Recover to create - The third workarounds is: use the tool org.h2.tools.Recover to create
the SQL script file, and then re-create the database using this script. the SQL script file, and then re-create the database using this script.
Does it work when you do this? Does it work when you do this?
- With which version of H2 was this database created? - With which version of H2 was this database created?
You can find it out using: You can find it out using:
select * from information_schema.settings where name='CREATE_BUILD' select * from information_schema.settings where name='CREATE_BUILD'
- Do you use any settings or special features (for example, the setting LOG=0, - Do you use any settings or special features (for example, the setting LOG=0,
or two phase commit, linked tables, cache settings)? or two phase commit, linked tables, cache settings)?
- Is the application multi-threaded? - Is the application multi-threaded?
- What operating system, file system, and virtual machine - What operating system, file system, and virtual machine
(java -version) do you use? (java -version) do you use?
- How big is the database (file sizes)? - How big is the database (file sizes)?
- Is the database usually closed normally, or is process terminated forcefully - Is the database usually closed normally, or is process terminated forcefully
or the computer switched off? or the computer switched off?
- Is it possible to reproduce this problem using a fresh database - Is it possible to reproduce this problem using a fresh database
(sometimes, or always)? (sometimes, or always)?
- Are there any other exceptions (maybe in the .trace.db file)? - Are there any other exceptions (maybe in the .trace.db file)?
Could you send them please? Could you send them please?
- Do you still have any .trace.db files, and if yes could you send them? - Do you still have any .trace.db files, and if yes could you send them?
- Could you send the .data.db file where this exception occurs? - Could you send the .data.db file where this exception occurs?
...@@ -20,8 +20,8 @@ TableFilter, ...@@ -20,8 +20,8 @@ TableFilter,
private void mapAndAddFilter(Expression on) throws SQLException { private void mapAndAddFilter(Expression on) throws SQLException {
on.mapColumns(this, 0); on.mapColumns(this, 0);
if (join == null || on.isEverything(ExpressionVisitor.RESOLVED)) { if (join == null || on.isEverything(ExpressionVisitor.RESOLVED)) {
addFilterCondition(on, true); addFilterCondition(on, true);
on.createIndexConditions(session, this); on.createIndexConditions(session, this);
} }
if (join != null) { if (join != null) {
join.mapAndAddFilter(on); join.mapAndAddFilter(on);
...@@ -69,8 +69,8 @@ drop table statisticlog; ...@@ -69,8 +69,8 @@ drop table statisticlog;
create table statisticlog(id int primary key, datatext varchar, moment int); create table statisticlog(id int primary key, datatext varchar, moment int);
@LOOP 20000 insert into statisticlog values(?, ?, ?); @LOOP 20000 insert into statisticlog values(?, ?, ?);
merge into statisticlog(id, datatext) key(id) merge into statisticlog(id, datatext) key(id)
select id, 'data1' from statisticlog order by moment limit 5; select id, 'data1' from statisticlog order by moment limit 5;
select * from statisticlog where id < 10; select * from statisticlog where id < 10;
UPDATE statisticlog SET datatext = 'data2' UPDATE statisticlog SET datatext = 'data2'
WHERE id IN (SELECT id FROM statisticlog ORDER BY moment LIMIT 5); WHERE id IN (SELECT id FROM statisticlog ORDER BY moment LIMIT 5);
select * from statisticlog where id < 10; select * from statisticlog where id < 10;
\ No newline at end of file
...@@ -7,13 +7,13 @@ and under the Eclipse Public License, Version 1.0 ...@@ -7,13 +7,13 @@ and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group Initial Developer: H2 Group
--> -->
<web-app xmlns="http://java.sun.com/xml/ns/javaee" <web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5"> version="2.5">
<display-name>H2 Console Web Application</display-name> <display-name>H2 Console Web Application</display-name>
<description> <description>
A web application that includes the H2 Console servlet. A web application that includes the H2 Console servlet.
</description> </description>
<servlet> <servlet>
...@@ -54,7 +54,7 @@ Initial Developer: H2 Group ...@@ -54,7 +54,7 @@ Initial Developer: H2 Group
<login-config> <login-config>
<auth-method>BASIC</auth-method> <auth-method>BASIC</auth-method>
<realm-name>H2 Console</realm-name> <realm-name>H2 Console</realm-name>
</login-config> </login-config>
<security-role> <security-role>
<role-name>admin</role-name> <role-name>admin</role-name>
......
...@@ -10,6 +10,6 @@ you need to add ...@@ -10,6 +10,6 @@ you need to add
return new H2MetaData(ds); return new H2MetaData(ds);
else else
just before just before
if ("oracle".equalsIgnoreCase(name)) if ("oracle".equalsIgnoreCase(name))
...@@ -215,6 +215,21 @@ public class CheckTextFiles { ...@@ -215,6 +215,21 @@ public class CheckTextFiles {
System.out.println("CHANGED: File " + file.getName()); System.out.println("CHANGED: File " + file.getName());
} }
} }
line = 1;
for (int i = 0; i < data.length; i++) {
if (data[i] < 32) {
line++;
for (int j = i + 1; j < data.length; j++) {
if (data[j] != 32) {
int mod = (j - i - 1) & 3;
if (mod != 0 && (mod != 1 || data[j] != '*')) {
fail(file, "contains wrong number of heading spaces: " + (j - i - 1), line);
}
break;
}
}
}
}
} }
private void fail(File file, String error, int line) { private void fail(File file, String error, int line) {
......
...@@ -371,9 +371,9 @@ public class Doclet { ...@@ -371,9 +371,9 @@ public class Doclet {
private boolean skipMethod(MethodDoc method) { private boolean skipMethod(MethodDoc method) {
ClassDoc clazz = method.containingClass(); ClassDoc clazz = method.containingClass();
boolean isInterface = clazz.isInterface() || (clazz.isAbstract() && method.isAbstract()); boolean isInterface = clazz.isInterface() || (clazz.isAbstract() && method.isAbstract());
if (INTERFACES_ONLY && !isInterface) { if (INTERFACES_ONLY && !isInterface) {
return true; return true;
} }
String name = method.name(); String name = method.name();
if (method.isPrivate() || name.equals("finalize")) { if (method.isPrivate() || name.equals("finalize")) {
return true; return true;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论