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

indentation

上级 a10beefa
......@@ -281,10 +281,10 @@ java org.h2.tools.Server
Run the tool on the command line:
<pre>
java org.h2.tools.CreateCluster
-urlSource jdbc:h2:tcp://localhost:9101/~/test
-urlTarget jdbc:h2:tcp://localhost:9102/~/test
-user sa
-serverList localhost:9101,localhost:9102
-urlSource jdbc:h2:tcp://localhost:9101/~/test
-urlTarget jdbc:h2:tcp://localhost:9102/~/test
-user sa
-serverList localhost:9101,localhost:9102
</pre>
</li><li>You can now connect to the databases using
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
<br /><a name="glossary_links"></a>
<h2>Glossary and Links</h2>
<table><tr><th>Term</th><th>Description</th></tr>
<tr>
<td>AES-128</td>
<td>
A block encryption algorithm. See also:
<a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">Wikipedia: AES</a>
</td>
</tr>
<tr>
<td>Birthday Paradox</td>
<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>
</td>
</tr>
<tr>
<td>Digest</td>
<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>
</td>
</tr>
<tr>
<td>GCJ</td>
<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>
</td>
</tr>
<tr>
<td>HTTPS</td>
<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>
</td>
</tr>
<tr>
<td>Modes of Operation</td>
<td>
<a href="http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation">Wikipedia: Block cipher modes of operation</a>
</td>
</tr>
<tr>
<td>Salt</td>
<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>
</td>
</tr>
<tr>
<td>SHA-256</td>
<td>
A cryptographic one-way hash function.
See also:
<a href="http://en.wikipedia.org/wiki/SHA_family">Wikipedia: SHA hash functions</a>
</td>
</tr>
<tr>
<td>SQL Injection</td>
<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>
</td>
</tr>
<tr>
<td>Watermark Attack</td>
<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'
</td>
</tr>
<tr>
<td>SSL/TLS</td>
<td>
Secure Sockets Layer / Transport Layer Security.
See also:
<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>
<tr>
<th>Term</th>
<th>Description</th>
</tr>
<tr>
<td>AES-128</td>
<td>A block encryption algorithm. See also: <a
href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">Wikipedia:
AES</a></td>
</tr>
<tr>
<td>Birthday Paradox</td>
<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></td>
</tr>
<tr>
<td>Digest</td>
<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></td>
</tr>
<tr>
<td>GCJ</td>
<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></td>
</tr>
<tr>
<td>HTTPS</td>
<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></td>
</tr>
<tr>
<td>Modes of Operation</td>
<td><a
href="http://en.wikipedia.org/wiki/Block_cipher_modes_of_operation">Wikipedia:
Block cipher modes of operation</a></td>
</tr>
<tr>
<td>Salt</td>
<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></td>
</tr>
<tr>
<td>SHA-256</td>
<td>A cryptographic one-way hash function. See also: <a
href="http://en.wikipedia.org/wiki/SHA_family">Wikipedia: SHA
hash functions</a></td>
</tr>
<tr>
<td>SQL Injection</td>
<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></td>
</tr>
<tr>
<td>Watermark Attack</td>
<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'</td>
</tr>
<tr>
<td>SSL/TLS</td>
<td>Secure Sockets Layer / Transport Layer Security. See also:
<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>
<!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html>
......@@ -487,7 +487,7 @@ Change Log
the zip file has been corrected.
</li><li>Invalid inline views threw confusing SQL exceptions.
</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>To protect against remote brute force password attacks,
the delay after each unsuccessful login now gets double as long.
......@@ -516,7 +516,7 @@ Change Log
now the 'true' is no longer needed.
The old behavior is still supported.
</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
updating all rows of a table in a loop. Fixed.
</li><li>ALTER TABLE or CREATE TABLE now support parameters for the password field.
......@@ -566,8 +566,8 @@ Change Log
</li><li>Fulltext search: new method SEARCH_DATA that returns the column
names and primary keys as arrays.
</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
property h2.optimizeGroupSorted to true.
that matches the group by columns. To enable this optimization, set the system
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
with uncommitted changes in the same session.
</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:
<ul>
<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
connections may result in inconsistent transactions.
connections may result in inconsistent transactions.
</li><li>Using FILE_LOCK=NO in the database URL.
</li></ul>
<p>
......
......@@ -21,34 +21,34 @@ Initial Developer: H2 Group
</div>
<form action="submit" onsubmit="return goFirst();">
<table width="100%" class="search">
<tr class="search">
<td class="search" colspan="2">
<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>
</td>
</tr>
<tr class="search">
<td class="search" colspan="2">
<b> Search: </b>
</td>
</tr>
<tr class="search">
<td class="search" colspan="2">
<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('', '');" />
</td>
</tr>
<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: 99%; padding: 0px; vertical-align: middle;"> Highlight keyword(s) </td>
</tr>
<tr class="search">
<td class="search" colspan="2">
<table id="result" style="border: 0px;">
<tr style="display:none"><td></td></tr>
</table>
</td>
</tr>
<tr class="search">
<td class="search" colspan="2">
<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>
</td>
</tr>
<tr class="search">
<td class="search" colspan="2">
<b> Search: </b>
</td>
</tr>
<tr class="search">
<td class="search" colspan="2">
<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('', '');" />
</td>
</tr>
<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: 99%; padding: 0px; vertical-align: middle;"> Highlight keyword(s) </td>
</tr>
<tr class="search">
<td class="search" colspan="2">
<table id="result" style="border: 0px;">
<tr style="display:none"><td></td></tr>
</table>
</td>
</tr>
</table>
</form>
<div class="menu">
......
......@@ -5,11 +5,11 @@ and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
<html><head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>H2 Database Engine</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>H2 Database Engine</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
<script type="text/javascript">
location.href = 'main.html';
location.href = 'main.html';
</script>
</head>
<body style="margin: 20px;">
......
......@@ -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:
</p>
<table>
<tr>
<th>Directory</th>
<th>Contents</th>
</tr>
<tr>
<td>bin</td>
<td>JAR and batch files</td>
</tr>
<tr>
<td>docs</td>
<td>Documentation</td>
</tr>
<tr>
<td>docs/html</td>
<td>HTML pages</td>
</tr>
<tr>
<td>docs/javadoc</td>
<td>Javadoc files</td>
</tr>
<tr>
<td>ext</td>
<td>External dependencies (downloaded when building)</td>
</tr>
<tr>
<td>service</td>
<td>Tools to run the database as a Windows Service</td>
</tr>
<tr>
<td>src</td>
<td>Source files</td>
</tr>
<tr>
<th>Directory</th>
<th>Contents</th>
</tr>
<tr>
<td>bin</td>
<td>JAR and batch files</td>
</tr>
<tr>
<td>docs</td>
<td>Documentation</td>
</tr>
<tr>
<td>docs/html</td>
<td>HTML pages</td>
</tr>
<tr>
<td>docs/javadoc</td>
<td>Javadoc files</td>
</tr>
<tr>
<td>ext</td>
<td>External dependencies (downloaded when building)</td>
</tr>
<tr>
<td>service</td>
<td>Tools to run the database as a Windows Service</td>
</tr>
<tr>
<td>src</td>
<td>Source files</td>
</tr>
</table>
<!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html>
......
......@@ -28,7 +28,7 @@ Microsoft .NET technology). The following JaQu code:
<pre>
Product p = new Product();
List&lt;Product> soldOutProducts =
db.from(p).where(p.unitsInStock).is(0).select();
db.from(p).where(p.unitsInStock).is(0).select();
</pre>
<p>
stands for the SQL statement:
......@@ -97,130 +97,129 @@ import org.h2.jaqu.Db;
import static org.h2.jaqu.Function.*;
public class Test {
Db db;
public static void main(String[] args) throws Exception {
new SamplesTest().test();
}
public void test() throws Exception {
db = Db.open("jdbc:h2:mem:", "sa", "sa");
db.insertAll(Product.getProductList());
db.insertAll(Customer.getCustomerList());
db.insertAll(Order.getOrderList());
testLength();
testCount();
testGroup();
testSelectManyCompoundFrom2();
testWhereSimple4();
testSelectSimple2();
testAnonymousTypes3();
testWhereSimple2();
testWhereSimple3();
db.close();
}
private void testWhereSimple2() throws Exception {
Product p = new Product();
List&lt;Product> soldOutProducts =
db.from(p).
where(p.unitsInStock).is(0).
orderBy(p.productId).select();
}
private void testWhereSimple3() throws Exception {
Product p = new Product();
List&lt;Product> expensiveInStockProducts =
db.from(p).
where(p.unitsInStock).bigger(0).
and(p.unitPrice).bigger(3.0).
orderBy(p.productId).select();
}
private void testWhereSimple4() throws Exception {
Customer c = new Customer();
List&lt;Customer> waCustomers =
db.from(c).
where(c.region).is("WA").
select();
}
private void testSelectSimple2() throws Exception {
Product p = new Product();
List&lt;String> productNames =
db.from(p).
orderBy(p.productId).select(p.productName);
List&lt;Product> products = Product.getProductList();
}
public static class ProductPrice {
public String productName;
public String category;
public Double price;
}
private void testAnonymousTypes3() throws Exception {
final Product p = new Product();
List&lt;ProductPrice> productInfos =
db.from(p).orderBy(p.productId).
select(new ProductPrice() { {
productName = p.productName;
category = p.category;
price = p.unitPrice;
}});
List&lt;Product> products = Product.getProductList();
}
public static class CustOrder {
public String customerId;
public Integer orderId;
public BigDecimal total;
}
private void testSelectManyCompoundFrom2() throws Exception {
final Customer c = new Customer();
final Order o = new Order();
List&lt;CustOrder> orders =
db.from(c).
innerJoin(o).on(c.customerId).is(o.customerId).
where(o.total).smaller(new BigDecimal("500.00")).
orderBy(1).
select(new CustOrder() { {
customerId = c.customerId;
orderId = o.orderId;
total = o.total;
}});
}
private void testLength() throws Exception {
Product p = new Product();
List&lt;Integer> lengths = db.from(p).
where(length(p.productName)).smaller(10).
orderBy(1).
selectDistinct(length(p.productName));
}
private void testCount() throws Exception {
long count = db.from(new Product()).selectCount();
}
public static class ProductGroup {
public String category;
public Long productCount;
}
private void testGroup() throws Exception {
final Product p = new Product();
List&lt;ProductGroup> list =
db.from(p).
groupBy(p.category).
orderBy(1).
select(new ProductGroup() { {
category = p.category;
productCount = count();
}});
}
Db db;
public static void main(String[] args) throws Exception {
new SamplesTest().test();
}
public void test() throws Exception {
db = Db.open("jdbc:h2:mem:", "sa", "sa");
db.insertAll(Product.getProductList());
db.insertAll(Customer.getCustomerList());
db.insertAll(Order.getOrderList());
testLength();
testCount();
testGroup();
testSelectManyCompoundFrom2();
testWhereSimple4();
testSelectSimple2();
testAnonymousTypes3();
testWhereSimple2();
testWhereSimple3();
db.close();
}
private void testWhereSimple2() throws Exception {
Product p = new Product();
List&lt;Product> soldOutProducts =
db.from(p).
where(p.unitsInStock).is(0).
orderBy(p.productId).select();
}
private void testWhereSimple3() throws Exception {
Product p = new Product();
List&lt;Product> expensiveInStockProducts =
db.from(p).
where(p.unitsInStock).bigger(0).
and(p.unitPrice).bigger(3.0).
orderBy(p.productId).select();
}
private void testWhereSimple4() throws Exception {
Customer c = new Customer();
List&lt;Customer> waCustomers =
db.from(c).
where(c.region).is("WA").
select();
}
private void testSelectSimple2() throws Exception {
Product p = new Product();
List&lt;String> productNames =
db.from(p).
orderBy(p.productId).select(p.productName);
List&lt;Product> products = Product.getProductList();
}
public static class ProductPrice {
public String productName;
public String category;
public Double price;
}
private void testAnonymousTypes3() throws Exception {
final Product p = new Product();
List&lt;ProductPrice> productInfos =
db.from(p).orderBy(p.productId).
select(new ProductPrice() { {
productName = p.productName;
category = p.category;
price = p.unitPrice;
}});
List&lt;Product> products = Product.getProductList();
}
public static class CustOrder {
public String customerId;
public Integer orderId;
public BigDecimal total;
}
private void testSelectManyCompoundFrom2() throws Exception {
final Customer c = new Customer();
final Order o = new Order();
List&lt;CustOrder> orders =
db.from(c).
innerJoin(o).on(c.customerId).is(o.customerId).
where(o.total).smaller(new BigDecimal("500.00")).
orderBy(1).
select(new CustOrder() { {
customerId = c.customerId;
orderId = o.orderId;
total = o.total;
}});
}
private void testLength() throws Exception {
Product p = new Product();
List&lt;Integer> lengths = db.from(p).
where(length(p.productName)).smaller(10).
orderBy(1).
selectDistinct(length(p.productName));
}
private void testCount() throws Exception {
long count = db.from(new Product()).selectCount();
}
public static class ProductGroup {
public String category;
public Long productCount;
}
private void testGroup() throws Exception {
final Product p = new Product();
List&lt;ProductGroup> list =
db.from(p).
groupBy(p.category).
orderBy(1).
select(new ProductGroup() { {
category = p.category;
productCount = count();
}});
}
}
</pre>
......
......@@ -31,7 +31,7 @@ Welcome to H2, the Java SQL database. The main feature of H2 are:
<table style="border: 0px; width: 425px;">
<tr><td style="border: 0px; background-color: #eee;">
<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>
Version ${version} (${versionDate}):
</td></tr>
......@@ -61,15 +61,15 @@ Welcome to H2, the Java SQL database. The main feature of H2 are:
Or send an e-mail to: <br />
<script type="text/javascript">
<!--
var a = '-support.png';
var b = 'mail';
var c = 'support ';
var d = 'db';
var e = 'at ';
var f = '.com';
var g = 'h2database';
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);
var a = '-support.png';
var b = 'mail';
var c = 'support ';
var d = 'db';
var e = 'at ';
var f = '.com';
var g = 'h2database';
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);
//-->
</script>
</p>
......@@ -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;">
<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>
<p>
You can contribute to the development of H2 by sending feedback and bug
......
......@@ -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) {
highlight();
} 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) {
searchArray = searchText.split(",");
if (!body || typeof(body.innerHTML) == "undefined") {
return false;
}
var bodyText = body.innerHTML;
for (var i = 0; i < searchArray.length; i++) {
var color = matchColor[i % matchColor.length];
}
var bodyText = body.innerHTML;
for (var i = 0; i < searchArray.length; i++) {
var color = matchColor[i % matchColor.length];
highlightStartTag = "<span ";
if(i==0) {
highlightStartTag += "id=firstFound ";
}
highlightStartTag += "style='color:#000000; background-color:#"+color+";'>";
bodyText = doHighlight(bodyText, searchArray[i], highlightStartTag, highlightEndTag);
}
return bodyText;
}
return bodyText;
}
function doHighlight(bodyText, searchTerm, highlightStartTag, highlightEndTag) {
if(searchTerm == undefined || searchTerm=="") {
return bodyText;
}
var newText = "";
var i = -1;
var lcSearchTerm = searchTerm.toLowerCase();
var lcBodyText = bodyText.toLowerCase();
while (bodyText.length > 0) {
i = lcBodyText.indexOf(lcSearchTerm, i+1);
if (i < 0) {
newText += bodyText;
bodyText = "";
} else {
// skip anything inside an HTML tag
if (bodyText.lastIndexOf(">", i) >= bodyText.lastIndexOf("<", i)) {
// skip anything inside a <script> block
if (lcBodyText.lastIndexOf("/script>", i) >= lcBodyText.lastIndexOf("<script", i)) {
newText += bodyText.substring(0, i) + highlightStartTag + bodyText.substr(i, searchTerm.length) + highlightEndTag;
bodyText = bodyText.substr(i + searchTerm.length);
lcBodyText = bodyText.toLowerCase();
i = -1;
if(searchTerm == undefined || searchTerm=="") {
return bodyText;
}
var newText = "";
var i = -1;
var lcSearchTerm = searchTerm.toLowerCase();
var lcBodyText = bodyText.toLowerCase();
while (bodyText.length > 0) {
i = lcBodyText.indexOf(lcSearchTerm, i+1);
if (i < 0) {
newText += bodyText;
bodyText = "";
} else {
// skip anything inside an HTML tag
if (bodyText.lastIndexOf(">", i) >= bodyText.lastIndexOf("<", i)) {
// skip anything inside a <script> block
if (lcBodyText.lastIndexOf("/script>", i) >= lcBodyText.lastIndexOf("<script", i)) {
newText += bodyText.substring(0, i) + highlightStartTag + bodyText.substr(i, searchTerm.length) + highlightEndTag;
bodyText = bodyText.substr(i + searchTerm.length);
lcBodyText = bodyText.toLowerCase();
i = -1;
}
}
}
}
}
}
return newText;
return newText;
}
var drag = false;
......
......@@ -348,7 +348,7 @@ Now convert the .trace.db file using the ConvertTraceFile tool:
</p>
<pre>
java -cp h2*.jar org.h2.tools.ConvertTraceFile
-traceFile "~/test.trace.db" -script "~/test.sql"
-traceFile "~/test.trace.db" -script "~/test.sql"
</pre>
<p>
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>,
<img class="screenshot" src="images/quickstart-1.png" alt="screenshot: start H2 Console" /><br />
A new console window appears:<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
on your machine, you can let the firewall block these connections. Only local connections are required at this time.
</p>
......@@ -75,7 +75,7 @@ Select <span class="button">Generic H2</span> and click <span class="button">Con
<p>
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 />
The SQL commands appear in the command area.<br />
The SQL commands appear in the command area.<br />
</p>
<h4>Execute</h4>
......
......@@ -22,34 +22,34 @@ Initial Developer: H2 Group
<form action="submit" onsubmit="return goFirst();">
<table width="100%" class="search">
<tr class="search">
<td class="search" colspan="2">
<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>
</td>
</tr>
<tr class="search">
<td class="search" colspan="2">
<b>Search:</b>
</td>
</tr>
<tr class="search">
<td class="search" colspan="2">
<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('', '');" />
</td>
</tr>
<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: 99%; padding: 0px; vertical-align: middle;">Highlight keyword(s)</td>
</tr>
<tr class="search">
<td class="search" colspan="2">
<table id="result" style="border: 0px;">
<tr style="display:none"><td></td></tr>
</table>
</td>
</tr>
<tr class="search">
<td class="search" colspan="2">
<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>
</td>
</tr>
<tr class="search">
<td class="search" colspan="2">
<b>Search:</b>
</td>
</tr>
<tr class="search">
<td class="search" colspan="2">
<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('', '');" />
</td>
</tr>
<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: 99%; padding: 0px; vertical-align: middle;">Highlight keyword(s)</td>
</tr>
<tr class="search">
<td class="search" colspan="2">
<table id="result" style="border: 0px;">
<tr style="display:none"><td></td></tr>
</table>
</td>
</tr>
</table>
</form>
......
......@@ -67,8 +67,8 @@ Depending on your platform and environment, there are multiple ways to start the
</p>
<table><tr><th>OS</th><th>Start</th></tr>
<tr>
<td>Windows</td>
<td>
<td>Windows</td>
<td>
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.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
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).
A browser window should open and point to the Login page http://localhost:8082).
</td>
</td>
</tr>
<tr>
<td>Windows</td>
<td>
<td>Windows</td>
<td>
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
in this window. A browser window will open and point to the Login page
(URL: http://localhost:8082).
</td>
</td>
</tr>
<tr>
<td>Any</td>
<td>
Open a console window, navigate to the directory 'h2/bin' and type:
<td>Any</td>
<td>
Open a console window, navigate to the directory 'h2/bin' and type:
<pre>
java -cp h2*.jar org.h2.tools.Server
</pre>
</td>
</td>
</tr>
</table>
......@@ -251,13 +251,13 @@ and then get a connection. A simple way to do that is using the following code:
<pre>
import java.sql.*;
public class Test {
public static void main(String[] a)
throws Exception {
Class.forName("org.h2.Driver");
Connection conn = DriverManager.
getConnection("jdbc:h2:~/test", "sa", "");
// add application code here
}
public static void main(String[] a)
throws Exception {
Class.forName("org.h2.Driver");
Connection conn = DriverManager.
getConnection("jdbc:h2:~/test", "sa", "");
// add application code here
}
}
</pre>
<p>
......@@ -381,8 +381,8 @@ To enable it, change the following setting in persistence.xml:
</p>
<pre>
&lt;property
name="toplink.target-database"
value="oracle.toplink.essentials.platform.database.H2Platform"/>
name="toplink.target-database"
value="oracle.toplink.essentials.platform.database.H2Platform"/>
</pre>
<p>
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
</p>
<pre>
&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>
</pre>
<p>
......@@ -442,20 +442,20 @@ These options are set just after the display-name and description tag, but befor
</p>
<pre>
&lt;context-param>
&lt;param-name>db.url&lt;/param-name>
&lt;param-value>jdbc:h2:~/test&lt;/param-value>
&lt;param-name>db.url&lt;/param-name>
&lt;param-value>jdbc:h2:~/test&lt;/param-value>
&lt;/context-param>
&lt;context-param>
&lt;param-name>db.user&lt;/param-name>
&lt;param-value>sa&lt;/param-value>
&lt;param-name>db.user&lt;/param-name>
&lt;param-value>sa&lt;/param-value>
&lt;/context-param>
&lt;context-param>
&lt;param-name>db.password&lt;/param-name>
&lt;param-value>sa&lt;/param-value>
&lt;param-name>db.password&lt;/param-name>
&lt;param-value>sa&lt;/param-value>
&lt;/context-param>
&lt;context-param>
&lt;param-name>db.tcpServer&lt;/param-name>
&lt;param-value>-tcpAllowOthers&lt;/param-value>
&lt;param-name>db.tcpServer&lt;/param-name>
&lt;param-value>-tcpAllowOthers&lt;/param-value>
&lt;/context-param>
</pre>
<p>
......
......@@ -10,7 +10,7 @@ Initial Developer: H2 Group
H2 Database Engine
</title><link rel="stylesheet" type="text/css" href="html/stylesheet.css" />
<script type="text/javascript">
location.href = 'html/main.html';
location.href = 'html/main.html';
</script>
</head>
<body style="margin: 20px;">
......
......@@ -14,9 +14,9 @@ Initial Developer: H2 Group
<body>
<table style="width: 100%; height: 100%; border: 0px;">
<tr style="border:0px; border-left:1px solid #aca899;">
<td style="border:0px; border-left:1px solid #aca899;">
<div style="margin:10px;">
<tr style="border:0px; border-left:1px solid #aca899;">
<td style="border:0px; border-left:1px solid #aca899;">
<div style="margin:10px;">
<div class="menu">
......
......@@ -13,9 +13,9 @@ Initial Developer: H2 Group
</head>
<body>
<table style="width: 100%; height: 100%; border: 0px;">
<tr style="border:0px; border-left:1px solid #aca899;">
<td style="border:0px; border-left:1px solid #aca899;">
<div style="margin:10px;">
<tr style="border:0px; border-left:1px solid #aca899;">
<td style="border:0px; border-left:1px solid #aca899;">
<div style="margin:10px;">
<h1>API Overview</h1>
......
......@@ -878,73 +878,79 @@ Description
AES-128
@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
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>
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
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>
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_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
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>
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_1303_a
Wikipedia: Block cipher modes of operation
Wikipedia: Block cipher modes of operation
@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>
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_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
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>
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
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'
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_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
XTEA
@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
......@@ -1904,7 +1910,7 @@ Databases in zip files: large queries are now supported. Temp files are created
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.
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.
......@@ -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
@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
User-Defined Functions and Stored Procedures
......@@ -4784,13 +4790,13 @@ means having the right to grant, to the maximum extent possible, whether at the
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:
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.
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.
1.9.b. Any new file that contains any part of the Original Code or previous Modifications.
@license_1036_b
1.10. "Original Code"
......
......@@ -880,73 +880,79 @@ SSL/TLS 接続
AES-128
@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
Birthday Paradox
@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
Digest
@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
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>
#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
HTTPS
@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
Modes of Operation
@advanced_1303_a
Wikipedia: Block cipher modes of operation
#Wikipedia: Block cipher modes of operation
@advanced_1304_td
Salt
@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
SHA-256
@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
SQLインジェクション
@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
Watermark Attack (透かし攻撃)
@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
SSL/TLS
@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
XTEA
@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
ビルド
......@@ -1906,7 +1912,7 @@ Centralリポジトリの利用
#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.
#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.
......@@ -4156,7 +4162,7 @@ Java Stringは不変のオブジェクトであり、アプリケーションに
ユーザー名 と (または) パスワードをURLで認証する
@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
ユーザー定義の関数とストアドプロシージャ
......@@ -4786,13 +4792,13 @@ Sourceファイル
#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:
#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.
#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.
#1.9.b. Any new file that contains any part of the Original Code or previous Modifications.
@license_1036_b
#1.10. "Original Code"
......
......@@ -291,29 +291,29 @@ advanced_1289_h2=Glossary and Links
advanced_1290_th=Term
advanced_1291_th=Description
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_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_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_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_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_1303_a=Wikipedia\: Block cipher modes of operation
advanced_1303_a=Wikipedia\: Block cipher modes of operation
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_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_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_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_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_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_1001_a=Portability
build_1002_a=Environment
......@@ -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_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_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_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.
......@@ -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_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_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_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\:
......@@ -1593,9 +1593,9 @@ license_1029_p=means this document.
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_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_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_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_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_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"
......
差异被折叠。
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>@version@</version>
<packaging>jar</packaging>
<name>H2 Database Engine</name>
<url>http://www.h2database.com</url>
<description>H2 Database Engine</description>
<artifactId>h2</artifactId>
<version>@version@</version>
<packaging>jar</packaging>
<name>H2 Database Engine</name>
<url>http://www.h2database.com</url>
<description>H2 Database Engine</description>
<licenses>
<license>
<name>The H2 License, Version 1.0</name>
......
......@@ -710,7 +710,7 @@ public class Parser {
column.columnName = readColumnIdentifier();
columns.add(column);
if (readIf("ASC")) {
// ignore
// ignore
} else if (readIf("DESC")) {
column.sortType = SortOrder.DESCENDING;
}
......
......@@ -48,7 +48,7 @@ public class LinkedIndex extends BaseIndex {
private boolean isNull(Value v) {
return v == null || v == ValueNull.INSTANCE;
}
}
public void add(Session session, Row row) throws SQLException {
StringBuffer buff = new StringBuffer("INSERT INTO ");
......
......@@ -27,7 +27,7 @@ public class Page {
*/
public static final int TYPE_DATA_LEAF = 1;
/**
/**
* A data node page (never has overflow pages).
*/
public static final int TYPE_DATA_NODE = 2;
......
......@@ -1326,7 +1326,7 @@ public class JdbcConnection extends TraceObject implements Connection {
ResultInterface getGeneratedKeys() throws SQLException {
getGeneratedKeys = prepareCommand("CALL IDENTITY()", getGeneratedKeys);
return getGeneratedKeys.executeQuery(0, false);
}
}
/**
* Create a new empty Clob object.
......
......@@ -2668,7 +2668,7 @@ public class JdbcDatabaseMetaData extends TraceObject implements DatabaseMetaDat
* @return DatabaseMetaData.sqlStateSQL99
*/
//## Java 1.4 begin ##
public int getSQLStateType() {
public int getSQLStateType() {
debugCodeCall("getSQLStateType");
return DatabaseMetaData.sqlStateSQL99;
}
......
......@@ -325,7 +325,7 @@ public class JdbcStatement extends TraceObject implements Statement {
}
}
/**
/**
* Gets the fetch direction.
*
* @return FETCH_FORWARD
......
......@@ -244,7 +244,7 @@ implements XAConnection, XAResource, JdbcConnectionListener
list.toArray(result);
return result;
} catch (SQLException e) {
throw new XAException(XAException.XAER_RMERR);
throw new XAException(XAException.XAER_RMERR);
} finally {
JdbcUtils.closeSilently(stat);
}
......
......@@ -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('', 'jdbc:h2:test2', 'sa', 'sa', '(SELECT * FROM TEST WHERE ID>0)');
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","
......
......@@ -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];
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];
}
}
public void encrypt(byte[] bytes, int off, int len) {
if (SysProperties.CHECK && (len % ALIGN != 0)) {
......
......@@ -121,14 +121,14 @@ as
select
t.id*10000 + c.ordinal_position oid,
t.id attrelid,
c.column_name attname,
data_type atttypid,
-1 attlen,
c.ordinal_position attnum,
-1 atttypmod,
false attnotnull,
false attisdropped,
false atthasdef
c.column_name attname,
data_type atttypid,
-1 attlen,
c.ordinal_position attnum,
-1 atttypmod,
false attnotnull,
false attisdropped,
false atthasdef
from information_schema.tables t, information_schema.columns c
where t.table_name = c.table_name
and t.table_schema = c.table_schema
......@@ -136,14 +136,14 @@ union all
select
1000000 + t.id*10000 + c.ordinal_position oid,
i.id attrelid,
c.column_name attname,
data_type atttypid,
-1 attlen,
c.ordinal_position attnum,
-1 atttypmod,
false attnotnull,
false attisdropped,
false atthasdef
c.column_name attname,
data_type atttypid,
-1 attlen,
c.ordinal_position attnum,
-1 atttypmod,
false attnotnull,
false attisdropped,
false atthasdef
from information_schema.tables t, information_schema.indexes i, information_schema.columns c
where t.table_name = i.table_name
and t.table_schema = i.table_schema
......
......@@ -99,16 +99,18 @@ public class WebServer implements Service {
*/
private static final long SESSION_TIMEOUT = 30 * 60 * 1000;
/*
String[] list = Locale.getISOLanguages();
for(int i=0; i<list.length; i++) System.out.print(list[i] + " ");
String lang = new java.util.Locale("hu").
getDisplayLanguage(new java.util.Locale("hu"));
java.util.Locale.CHINESE.getDisplayLanguage(
java.util.Locale.CHINESE);
for(int i=0; i<lang.length(); i++)
System.out.println(Integer.toHexString(lang.charAt(i))+" ");
*/
// static {
// String[] list = Locale.getISOLanguages();
// for (int i = 0; i < list.length; i++) {
// System.out.print(list[i] + " ");
// }
// String lang = new java.util.Locale("hu").
// getDisplayLanguage(new java.util.Locale("hu"));
// java.util.Locale.CHINESE.getDisplayLanguage(java.util.Locale.CHINESE);
// for (int i = 0; i < lang.length(); i++) {
// System.out.println(Integer.toHexString(lang.charAt(i)) + " ");
// }
// }
// private URLClassLoader urlClassLoader;
private String driverList;
......
......@@ -28,11 +28,11 @@ Initial Developer: H2 Group
class="icon" alt="${text.toolbar.refresh}" title="${text.toolbar.refresh}" border="1" /></a
><img src="icon_line.gif" class="iconLine" alt=""
/></td><td class="toolbar"><input type="checkbox" name="autoCommit" value="autoCommit"
onclick="javascript:if(document.header.autoCommit.checked)
top.frames['h2result'].document.location='query.do?jsessionid=${sessionId}&amp;sql=@AUTOCOMMIT+TRUE';
else
top.frames['h2result'].document.location='query.do?jsessionid=${sessionId}&amp;sql=@AUTOCOMMIT+FALSE';
"
onclick="javascript:if(document.header.autoCommit.checked)
top.frames['h2result'].document.location='query.do?jsessionid=${sessionId}&amp;sql=@AUTOCOMMIT+TRUE';
else
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"
><a href="query.do?jsessionid=${sessionId}&amp;sql=ROLLBACK" target="h2result"
><img src="icon_rollback.gif"
......@@ -47,7 +47,7 @@ Initial Developer: H2 Group
><img src="icon_line.gif" class="iconLine" alt=""
/></td><td class="toolbar">&nbsp;${text.toolbar.maxRows}:&nbsp;</td><td class="toolbar"
><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="10000">10000</option>
<option selected="selected" value="1000">1000</option>
......@@ -72,7 +72,7 @@ Initial Developer: H2 Group
class="icon" alt="${text.toolbar.history}" title="${text.toolbar.history}" border="1" /></a
><img src="icon_line.gif" class="iconLine" alt=""
/></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 selected="selected" value="1">${text.toolbar.autoComplete.normal}</option>
<option value="2">${text.toolbar.autoComplete.full}</option>
......
......@@ -13,7 +13,7 @@ Initial Developer: H2 Group
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
</head>
<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">
<!--
function set(s) {
......@@ -28,25 +28,25 @@ function set(s) {
<table>
<tr><th>${text.helpIcon}</th><th>${text.helpAction}</th></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;">
${text.helpDisplayThis}
</td>
</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;">
${text.helpCommandHistory}
</td>
</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;">
${text.helpExecuteCurrent}
</td>
</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;">
${text.helpDisconnect}
</td>
......@@ -83,4 +83,4 @@ ${text.helpAddDriversText}
<table id="h2auto" class="autoComp"><tbody></tbody></table>
</body></html>
\ No newline at end of file
</body></html>
......@@ -11,7 +11,7 @@ Initial Developer: H2 Group
<title>${text.a.title}</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
<script type="text/javascript">
location.href = 'login.jsp?jsessionid=${sessionId}';
location.href = 'login.jsp?jsessionid=${sessionId}';
</script>
</head>
<body style="margin: 20px;">
......
......@@ -23,12 +23,12 @@ Initial Developer: H2 Group
>
${languageCombo}
</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="help.jsp?jsessionid=${sessionId}">${text.a.help}</a>
</p>
&nbsp;&nbsp; <a href="tools.jsp?jsessionid=${sessionId}">${text.a.tools}</a>
&nbsp;&nbsp; <a href="help.jsp?jsessionid=${sessionId}">${text.a.help}</a>
</p>
<table class="login" cellspacing="0" cellpadding="0">
<tr class="login">
<th class="login">${text.login.login}</th>
......
......@@ -105,12 +105,12 @@ function setSelection(element) {
try {
var range = document.selection.createRange();
var copy = range.duplicate();
copy.moveToElementText(element);
copy.moveToElementText(element);
copy.setEndPoint('EndToEnd', range);
element.selectionStart = copy.text.length - range.text.length;
element.selectionEnd = element.selectionStart + range.text.length;
element.selectionStart = copy.text.length - range.text.length;
element.selectionEnd = element.selectionStart + range.text.length;
} catch (e) {
element.selectionEnd = element.selectionStart = 0;
element.selectionEnd = element.selectionStart = 0;
}
}
}
......@@ -418,13 +418,13 @@ function sendAsyncRequest(url) {
req = false;
}
} else if(window.ActiveXObject) {
try {
try {
req = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
} catch(e) {
try {
req = new ActiveXObject("Microsoft.XMLHTTP");
req = new ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {
req = false;
req = false;
}
}
}
......
......@@ -16,8 +16,8 @@ Initial Developer: H2 Group
<body class="result">
<div id="output">
${result}
</div>
${result}
</div>
<table id="h2auto" class="autoComp"><tbody></tbody></table>
......
......@@ -26,7 +26,7 @@ function initSort() {
if(document.getElementById('editing') != undefined) {
// don't allow sorting while editing
return;
}
}
var tables = document.getElementsByTagName("table");
for (var i=0; i<tables.length; i++) {
table = tables[i];
......@@ -172,7 +172,7 @@ function resortTable(link) {
var allSpans = document.getElementsByTagName("span");
for (var i=0;i<allSpans.length;i++) {
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")) {
allSpans[i].innerHTML = '&nbsp;&nbsp;';
}
......
......@@ -301,15 +301,15 @@ ShutdownHandler {
// trayIcon.addMouseListener(this);
trayIcon.getClass().
getMethod("addMouseListener", new Class[]{MouseListener.class}).
invoke(trayIcon, new Object[]{this});
getMethod("addMouseListener", new Class[]{MouseListener.class}).
invoke(trayIcon, new Object[]{this});
// tray.add(icon);
tray.getClass().
// tray.add(icon);
tray.getClass().
getMethod("add", new Class[] { Class.forName("java.awt.TrayIcon") }).
invoke(tray, new Object[] { trayIcon });
return true;
return true;
} catch (Exception e) {
return false;
}
......
......@@ -153,18 +153,18 @@ public class JdbcUtils {
return ds.getConnection();
}
return ds.getConnection(user, password);
} catch (InstantiationException e) {
throw Message.convert(e);
} catch (IllegalAccessException e) {
throw Message.convert(e);
} catch (NamingException e) {
throw Message.convert(e);
}
//## Java 1.4 end ##
} else {
} catch (InstantiationException e) {
throw Message.convert(e);
} catch (IllegalAccessException e) {
throw Message.convert(e);
} catch (NamingException e) {
throw Message.convert(e);
}
//## Java 1.4 end ##
} else {
// Don't know, but maybe it loaded a JDBC Driver
return DriverManager.getConnection(url, prop);
}
}
}
return DriverManager.getConnection(url, prop);
}
......
......@@ -36,6 +36,6 @@ extends HashMap
//## Java 1.4 begin ##
protected boolean removeEldestEntry(Map.Entry eldest) {
return size() > size;
}
}
//## Java 1.4 end ##
}
......@@ -272,7 +272,7 @@ public class DataType {
add(Value.BYTES, Types.VARBINARY, "Bytes",
createString(false),
new String[]{"VARBINARY"},
8
8
);
add(Value.BYTES, Types.BINARY, "Bytes",
createString(false),
......
......@@ -186,7 +186,7 @@ public class ValueLob extends Value {
}
long inplace = handler.getMaxLengthInplaceLob();
if (inplace >= Integer.MAX_VALUE) {
inplace = remaining;
inplace = remaining;
}
long m = compress ? Constants.IO_BUFFER_SIZE_COMPRESS : Constants.IO_BUFFER_SIZE;
if (m < remaining && m <= inplace) {
......
......@@ -20,5 +20,5 @@ public class ShutdownServer {
*/
public static void main(String[] args) throws Exception {
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;
<link rel="icon" type="image/png" href="/path/image.png">
create a short one page documentation
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/
postgresql generate_series?
......@@ -323,7 +323,7 @@ implemented:
- small result sets (up to fetch size)
- throws an error when autocommit is false
- 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
- batch updates
- ignored in embedded mode
......
......@@ -488,7 +488,7 @@ public class TestFunctions extends TestBase implements AggregateFunction {
* @return the value
*/
public static BigDecimal noOp(BigDecimal dec) {
return dec;
return dec;
}
/**
......
......@@ -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("insert into a(code) values('one')");
try {
s2.execute("insert into b values('un B', 1)");
fail();
s2.execute("insert into b values('un B', 1)");
fail();
} catch (SQLException e) {
assertKnownException(e);
}
......
......@@ -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?
- What is your database URL?
- 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?
- Did you use multiple connections?
- 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
(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 SQL script file, and then re-create the database using this script.
Does it work when you do this?
the SQL script file, and then re-create the database using this script.
Does it work when you do this?
- With which version of H2 was this database created?
You can find it out using:
select * from information_schema.settings where name='CREATE_BUILD'
You can find it out using:
select * from information_schema.settings where name='CREATE_BUILD'
- 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?
- 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)?
- 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
(sometimes, or always)?
(sometimes, or always)?
- 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?
- Could you send the .data.db file where this exception occurs?
......@@ -20,8 +20,8 @@ TableFilter,
private void mapAndAddFilter(Expression on) throws SQLException {
on.mapColumns(this, 0);
if (join == null || on.isEverything(ExpressionVisitor.RESOLVED)) {
addFilterCondition(on, true);
on.createIndexConditions(session, this);
addFilterCondition(on, true);
on.createIndexConditions(session, this);
}
if (join != null) {
join.mapAndAddFilter(on);
......@@ -69,8 +69,8 @@ drop table statisticlog;
create table statisticlog(id int primary key, datatext varchar, moment int);
@LOOP 20000 insert into statisticlog values(?, ?, ?);
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;
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;
\ No newline at end of file
......@@ -7,13 +7,13 @@ and under the Eclipse Public License, Version 1.0
Initial Developer: H2 Group
-->
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
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"
version="2.5">
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"
version="2.5">
<display-name>H2 Console Web Application</display-name>
<description>
A web application that includes the H2 Console servlet.
A web application that includes the H2 Console servlet.
</description>
<servlet>
......@@ -54,7 +54,7 @@ Initial Developer: H2 Group
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>H2 Console</realm-name>
</login-config>
</login-config>
<security-role>
<role-name>admin</role-name>
......
......@@ -10,6 +10,6 @@ you need to add
return new H2MetaData(ds);
else
just before
just before
if ("oracle".equalsIgnoreCase(name))
......@@ -215,6 +215,21 @@ public class CheckTextFiles {
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) {
......
......@@ -371,9 +371,9 @@ public class Doclet {
private boolean skipMethod(MethodDoc method) {
ClassDoc clazz = method.containingClass();
boolean isInterface = clazz.isInterface() || (clazz.isAbstract() && method.isAbstract());
if (INTERFACES_ONLY && !isInterface) {
return true;
}
if (INTERFACES_ONLY && !isInterface) {
return true;
}
String name = method.name();
if (method.isPrivate() || name.equals("finalize")) {
return true;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论