提交 169d35de authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 cc5b37eb
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2007 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
Initial Developer: H2 Group
-->
<html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Data Types
</title><link rel="stylesheet" type="text/css" href="stylesheet.css" />
<script type="text/javascript" src="navigation.js"></script>
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2007 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
Initial Developer: H2 Group
-->
<html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
Functions
</title><link rel="stylesheet" type="text/css" href="stylesheet.css" />
<script type="text/javascript" src="navigation.js"></script>
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Copyright 2004-2007 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
Initial Developer: H2 Group
-->
<html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
SQL Grammar
</title><link rel="stylesheet" type="text/css" href="stylesheet.css" />
<script type="text/javascript" src="navigation.js"></script>
......
......@@ -40,7 +40,9 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch.
<h3>Version 1.0 (Current)</h3>
<h3>Version 1.0 / TODO (Build xx)</h3><ul>
<li>Improved error messages: some tools can't show the root cause of an exception.
<li>Some unit tests failed on Linux because the file system works differently. The unit tests are fixed and should work now.
</li><li>Can now incrementally translate the documentation. See also FAQ.
</li><li>Improved error messages: some tools can't show the root cause of an exception.
Adding the message of the root cause to the message of the thrown exception now where it makes sense.
</li><li>The H2 Console can now connect to databases using JNDI. The driver class name must be a javax.naming.Context,
(for example javax.naming.InitialContext), and the URL the resource name (for example java:comp/env/jdbc/Test).
......@@ -1120,6 +1122,7 @@ Hypersonic SQL or HSQLDB. H2 is built from scratch.
</li><li>Support N'text'
</li><li>Support SCOPE_IDENTITY() to avoid problems when inserting rows in a trigger
</li><li>Support DESCRIBE like MySQL or Oracle (DESC|DESCRIBE {[schema.]object[@connect_identifier]})
</li><li>Set a connection read only (Connection.setReadOnly)
</li></ul>
<h3>Not Planned</h3>
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Copyright 2004-2007 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html). -->
<html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><title>
H2 Database Engine
</title><link rel="stylesheet" type="text/css" href="stylesheet.css" />
......@@ -128,7 +126,7 @@ Welcome to H2, the free SQL database. The main feature of H2 are:
</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
<input type="hidden" name="cmd" value="_s-xclick"/>
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" border="0" name="submit" alt="PayPal"/>
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" name="submit" alt="PayPal"/>
<img alt="" border="0" src="https://www.paypal.com/de_DE/i/scr/pixel.gif" width="1" height="1" />
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHNwYJKoZIhvcNAQcEoIIHKDCCByQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBT5YHCnqqyWDNUoD0DGudVB/0gMr1D2iOAKr/X+zR9VGBMeZsBtgmJphsbszGxXXEGxwzIVAv/ys+8TKW/uvk9UvZcDqFbCvupXmVIv3dp143N1xHsyLQGGHd8aFNraqCF7fdFoQ8GHzwvNw0VaPbGqU6udswpKz/225zBkMCjTjELMAkGBSsOAwIaBQAwgbQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIvFAVO1Ru/gCAgZCWN/nYxfM8UtcqFy4Z+KefQIgmUISauadMhddUvvkARcSyEOITMCoEkJCc0KC+2mp9noBz2VhDO7uxNIjdj4O74V4iNcRsSy2d7CJe4QEBw2PCrnw2GsLkcL0DDfCE4Y0KfF6zHyUq/GNGUVR8ZhrFTSSLjh4tJJzuLYBPIbWHv89K1OJsWGuHs8dB5zGcbQ6gggOHMII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Y/4ihuE4Ymvzn5ceE3S/iBSQQMjyvb+s2TWbQYDwcp129OPIbD9epdr4tJOUNiSojw7BHwYRiPh58S1xGlFgHFXwrEBb3dgNbMUa+u4qectsMAXpVHnD9wIyfmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wNzAxMDcxMTI5MzFaMCMGCSqGSIb3DQEJBDEWBBRCGFuirr8xc1NmatO8jdDYt93luzANBgkqhkiG9w0BAQEFAASBgLJMfUrlr/Ckx/peA6UOkMqsB20W7M9FC4dYaGrlhSf0Og2N3NVlBrliloxGq85KpLnwJsKsh1wbP2aMGHvbicpCOsRoogPVvFI0cLb2UfPFkT0fRuEKerxcVVZQq26WjMq3h/Gps5tQEBGEB5Ok9IGP/dusNA+YijCt5XA/WM47-----END PKCS7-----"/>
</form>
......
......@@ -3,6 +3,7 @@
Copyright 2004-2007 H2 Group. Licensed under the H2 License, Version 1.0 (http://h2database.com/html/license.html).
Initial Developer: H2 Group
-->
<!-- XHTML doesn't support tables without rows -->
<html><head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Search</title>
......@@ -32,7 +33,7 @@ Initial Developer: H2 Group
</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 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>
......@@ -43,6 +44,7 @@ Initial Developer: H2 Group
<tr class="search">
<td class="search" colspan="2">
<table id="result" style="border: 0px;">
<tr><td /></tr>
</table>
</td>
</tr>
......
......@@ -38,7 +38,7 @@ public class FileLock {
private static final String MAGIC = "FileLock";
private static final String FILE = "file", SOCKET = "socket";
private static final int RANDOM_BYTES = 16;
private static final int SLEEP_GAP = 20;
private static final int SLEEP_GAP = 25;
private static final int TIME_GRANULARITY = 2000;
private String method, ipAddress;
......@@ -49,6 +49,8 @@ public class FileLock {
private volatile ServerSocket socket;
private boolean locked;
private Trace trace;
// private java.nio.channels.FileLock fileLock;
public FileLock(TraceSystem traceSystem, int sleep) {
this.trace = traceSystem.getTrace(Trace.FILE_LOCK);
......
......@@ -94,9 +94,6 @@ java -Xmx512m -Xrunhprof:cpu=samples,depth=8 org.h2.tools.RunScript -url jdbc:h2
/*
strict xhtml (javadocs,...)
make docs translatable
add to maven
docs: CACHE_SIZE=200000 maybe too much?
......
......@@ -101,6 +101,16 @@ public class TestLob extends TestBase {
try {
conn.createStatement().execute("DELETE FROM TEST");
conn.commit();
// DELETE does now fail in all systems (Linux), but in some
// error("Error expected");
// but reading afterwards should fail
while(true) {
int x = in.read();
if(x < 0) {
break;
}
}
in.close();
error("Error expected");
} catch(SQLException e) {
checkNotGeneralException(e);
......
......@@ -5,6 +5,7 @@
package org.h2.test.db;
import java.io.File;
import java.io.RandomAccessFile;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
......@@ -19,16 +20,34 @@ public class TestReadOnly extends TestBase {
if(config.memory) {
return;
}
File f = File.createTempFile("test", "temp");
check(f.canWrite());
f.setReadOnly();
check(!f.canWrite());
f.delete();
f = File.createTempFile("test", "temp");
RandomAccessFile r = new RandomAccessFile(f, "rw");
r.write(1);
f.setReadOnly();
r.close();
check(!f.canWrite());
f.delete();
deleteDb("readonly");
Connection conn = getConnection("readonly");
Statement stat = conn.createStatement();
stat.execute("CREATE TABLE TEST(ID INT PRIMARY KEY, NAME VARCHAR)");
stat.execute("INSERT INTO TEST VALUES(1, 'Hello')");
stat.execute("INSERT INTO TEST VALUES(2, 'World')");
check(!conn.isReadOnly());
conn.close();
setReadOnly();
conn = getConnection("readonly");
check(conn.isReadOnly());
stat = conn.createStatement();
stat.execute("SELECT * FROM TEST");
try {
......
......@@ -18,7 +18,7 @@ import org.h2.util.FileUtils;
public class TestFileLock extends TestBase implements Runnable {
int wait;
static final int KILL = 10;
static final int KILL = 5;
static final String FILE = BASE_DIR + "/test.lock";
private boolean allowSockets;
......@@ -38,7 +38,7 @@ public class TestFileLock extends TestBase implements Runnable {
Thread.sleep(wait + (int) (Math.random() * wait));
}
trace("wait");
Thread.sleep(100);
Thread.sleep(500);
stop = true;
trace("STOP file");
for (int i = 0; i < threadCount; i++) {
......@@ -77,7 +77,7 @@ public class TestFileLock extends TestBase implements Runnable {
base.trace(lock + " locked");
locks++;
if (locks > 1) {
System.err.println("ERROR! LOCKS=" + locks);
System.err.println("ERROR! LOCKS=" + locks + " sockets=" + allowSockets);
stop = true;
}
Thread.sleep(wait + (int) (Math.random() * wait));
......
......@@ -54,9 +54,6 @@ public class Doclet {
String className = getClass(clazz.name());
FileWriter out = new FileWriter(fileName);
PrintWriter writer = new PrintWriter(new BufferedWriter(out));
int validateXhtml;
// writer.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">");
// writer.println("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" /><title>");
writer.println("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">");
String language = "en";
writer.println("<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\""+language+"\" xml:lang=\""+language+"\">");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论