提交 82df28c0 authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 5eff30c5
...@@ -15,12 +15,12 @@ Change Log ...@@ -15,12 +15,12 @@ Change Log
<h2>Next Version (unreleased)</h2> <h2>Next Version (unreleased)</h2>
<ul> <ul>
</li><li>When using multi-version concurrency (MVCC=TRUE), duplicate rows could appear in the result set when running queries <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.
Fixed (now using getHostAddress/getRemoteAddr. Fixed (now using getHostAddress/getRemoteAddr.
</li><li>H2 Console: on Linux, Firefox, Konqueror, or Opera (in this order) are now started if available. </li><li>H2 Console: on Linux, Firefox, Konqueror, or Opera (in this order) are now started if available.
This has been tested on Ubuntu. This has been tested on Ubuntu.
</li><li>H2 Console: the start window works better with IKVM </li><li>H2 Console: the start window works better with IKVM
</li><li>H2 Console: improved compatibility with Safari (Safari requires keep-alive) </li><li>H2 Console: improved compatibility with Safari (Safari requires keep-alive)
</li><li>Random: the process didn't stop if generating the random seed using the standard </li><li>Random: the process didn't stop if generating the random seed using the standard
......
...@@ -13,13 +13,13 @@ H2 In Use and Links ...@@ -13,13 +13,13 @@ H2 In Use and Links
<h1>H2 In Use and Links</h1> <h1>H2 In Use and Links</h1>
<h2>Books</h2><p> <h2>Books</h2>
<a href="http://code.google.com/p/seaminaction/wiki/GettingStarted">
<a href="http://code.google.com/p/seaminaction/wiki/GettingStarted%20">Seam In Action</a> Seam In Action</a>
<h2>Extensions</h2> <h2>Extensions</h2>
<a href="http://geosysin.iict.ch/irstv-trac/wiki/H2spatial/Download"> <a href="http://geosysin.iict.ch/irstv-trac/wiki/H2spatial/Download">
Spatial capabilities</a><br /> Spatial capabilities</a>
<h2>Blogs</h2> <h2>Blogs</h2>
<a href="http://www.bluedevel.com/blog/?p=12"> <a href="http://www.bluedevel.com/blog/?p=12">
......
...@@ -505,6 +505,32 @@ The steps to connect to a H2 database are: ...@@ -505,6 +505,32 @@ The steps to connect to a H2 database are:
<p> <p>
Now you can access the database stored in the directory C:/temp. Now you can access the database stored in the directory C:/temp.
</p> </p>
<p>
To use H2 in NeoOffice (OpenOffice without X11):
</p>
<ul><li>In NeoOffice, go to [NeoOffice], [Preferences]
</li><li>Look for the page under [NeoOffice], [Java]
</li><li>Click [Classpath], [Add Archive...]
</li><li>Select your h2.jar (location is up to you, could be wherever you choose)
</li><li>Click [OK] (as much as needed), restart NeoOffice.
</li></ul>
<p>
Now, when creating a new database using the "Database Wizard":
</p>
<ul><li>Select "connect to existing database" and the type "jdbc". Click next.
</li><li>Enter your h2 database URL. The normal behavior of H2 is that a new db is created if it doesn't exist.
</li><li>Next step - up to you... you can just click finish and start working.
</li></ul>
<p>
Another solution to use H2 in NeoOffice is:
</p>
<ul><li>Package the h2 jar within an extension package
</li><li>Install it as a Java extension in NeoOffice
</li></ul>
<p>
This can be done by create it using the NetBeans OpenOffice plugin.
See also <a href="http://wiki.services.openoffice.org/wiki/Extensions_development_java">Extensions Development</a>.
</p>
<br /><a name="web_start"></a> <br /><a name="web_start"></a>
<h2>Java Web Start / JNLP</h2> <h2>Java Web Start / JNLP</h2>
......
...@@ -234,6 +234,13 @@ public class SysProperties { ...@@ -234,6 +234,13 @@ public class SysProperties {
/** /**
* System property <code>h2.optimizeDistinct</code> (default: true).<br /> * System property <code>h2.optimizeDistinct</code> (default: true).<br />
* Improve the performance of simple DISTINCT queries if an index is available for the given column. * Improve the performance of simple DISTINCT queries if an index is available for the given column.
* The optimization is used if:
* <ul><li>The select is a single column query without condition
* </li><li>The query contains only one table, and no group by
* </li><li>There is only one table involved
* </li><li>There is an ascending index on the column
* </li><li>The selectivity of the column is below 20
* </li></ul>
*/ */
public static final boolean OPTIMIZE_DISTINCT = getBooleanSetting("h2.optimizeDistinct", true); public static final boolean OPTIMIZE_DISTINCT = getBooleanSetting("h2.optimizeDistinct", true);
......
...@@ -30,7 +30,7 @@ import org.h2.value.ValueNull; ...@@ -30,7 +30,7 @@ import org.h2.value.ValueNull;
* <ul> * <ul>
* <li>There is one {@link BtreeHead} that points to the root page. * <li>There is one {@link BtreeHead} that points to the root page.
* The head always stays where it is. * The head always stays where it is.
* </li><li>There is a number of {@link BtreePage}s. Each page is eighter * </li><li>There is a number of {@link BtreePage}s. Each page is either
* a {@link BtreeNode} or a {@link BtreeLeaf}. * a {@link BtreeNode} or a {@link BtreeLeaf}.
* </li><li>A node page links to other leaf pages or to node pages. * </li><li>A node page links to other leaf pages or to node pages.
* Leaf pages don't point to other pages (but may have a parent). * Leaf pages don't point to other pages (but may have a parent).
......
...@@ -1437,7 +1437,7 @@ class WebThread extends Thread implements DatabaseEventListener { ...@@ -1437,7 +1437,7 @@ class WebThread extends Thread implements DatabaseEventListener {
// TODO meta data: more supports methods (I'm tired now) // TODO meta data: more supports methods (I'm tired now)
rs.addRow(new String[] { "meta.usesLocalFilePerTable", "" + meta.usesLocalFilePerTable() }); rs.addRow(new String[] { "meta.usesLocalFilePerTable", "" + meta.usesLocalFilePerTable() });
rs.addRow(new String[] { "meta.usesLocalFiles", "" + meta.usesLocalFiles() }); rs.addRow(new String[] { "meta.usesLocalFiles", "" + meta.usesLocalFiles() });
// #ifdef JDK14 //#ifdef JDK14
rs.addRow(new String[] { "conn.getHoldability", "" + conn.getHoldability() }); rs.addRow(new String[] { "conn.getHoldability", "" + conn.getHoldability() });
rs.addRow(new String[] { "meta.getDatabaseMajorVersion", "" + meta.getDatabaseMajorVersion() }); rs.addRow(new String[] { "meta.getDatabaseMajorVersion", "" + meta.getDatabaseMajorVersion() });
rs.addRow(new String[] { "meta.getDatabaseMinorVersion", "" + meta.getDatabaseMinorVersion() }); rs.addRow(new String[] { "meta.getDatabaseMinorVersion", "" + meta.getDatabaseMinorVersion() });
...@@ -1447,7 +1447,7 @@ class WebThread extends Thread implements DatabaseEventListener { ...@@ -1447,7 +1447,7 @@ class WebThread extends Thread implements DatabaseEventListener {
rs.addRow(new String[] { "meta.getSQLStateType", "" + meta.getSQLStateType() }); rs.addRow(new String[] { "meta.getSQLStateType", "" + meta.getSQLStateType() });
rs.addRow(new String[] { "meta.supportsGetGeneratedKeys", "" + meta.supportsGetGeneratedKeys() }); rs.addRow(new String[] { "meta.supportsGetGeneratedKeys", "" + meta.supportsGetGeneratedKeys() });
rs.addRow(new String[] { "meta.locatorsUpdateCopy", "" + meta.locatorsUpdateCopy() }); rs.addRow(new String[] { "meta.locatorsUpdateCopy", "" + meta.locatorsUpdateCopy() });
// #endif //#endif
return rs; return rs;
} else if (sql.startsWith("@CATALOGS")) { } else if (sql.startsWith("@CATALOGS")) {
return meta.getCatalogs(); return meta.getCatalogs();
...@@ -1491,7 +1491,7 @@ class WebThread extends Thread implements DatabaseEventListener { ...@@ -1491,7 +1491,7 @@ class WebThread extends Thread implements DatabaseEventListener {
return meta.getUDTs(p[1], p[2], p[3], types); return meta.getUDTs(p[1], p[2], p[3], types);
} else if (sql.startsWith("@TYPE_INFO")) { } else if (sql.startsWith("@TYPE_INFO")) {
return meta.getTypeInfo(); return meta.getTypeInfo();
// #ifdef JDK14 //#ifdef JDK14
} else if (sql.startsWith("@SUPER_TYPES")) { } else if (sql.startsWith("@SUPER_TYPES")) {
String[] p = split(sql); String[] p = split(sql);
return meta.getSuperTypes(p[1], p[2], p[3]); return meta.getSuperTypes(p[1], p[2], p[3]);
...@@ -1501,7 +1501,7 @@ class WebThread extends Thread implements DatabaseEventListener { ...@@ -1501,7 +1501,7 @@ class WebThread extends Thread implements DatabaseEventListener {
} else if (sql.startsWith("@ATTRIBUTES")) { } else if (sql.startsWith("@ATTRIBUTES")) {
String[] p = split(sql); String[] p = split(sql);
return meta.getAttributes(p[1], p[2], p[3], p[4]); return meta.getAttributes(p[1], p[2], p[3], p[4]);
// #endif //#endif
} }
return null; return null;
} }
...@@ -1595,9 +1595,9 @@ class WebThread extends Thread implements DatabaseEventListener { ...@@ -1595,9 +1595,9 @@ class WebThread extends Thread implements DatabaseEventListener {
session.addCommand(sql); session.addCommand(sql);
if (generatedKeys) { if (generatedKeys) {
rs = null; rs = null;
// #ifdef JDK14 //#ifdef JDK14
rs = stat.getGeneratedKeys(); rs = stat.getGeneratedKeys();
// #endif //#endif
} else { } else {
if (!isResultSet) { if (!isResultSet) {
buff.append("${text.result.updateCount}: " + stat.getUpdateCount()); buff.append("${text.result.updateCount}: " + stat.getUpdateCount());
......
...@@ -10,7 +10,7 @@ Initial Developer: H2 Group ...@@ -10,7 +10,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 - tested on firefox, opera, ie, safari --><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><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 - tested on firefox, opera, ie, safari --><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) {
......
...@@ -262,13 +262,13 @@ ShutdownHandler { ...@@ -262,13 +262,13 @@ ShutdownHandler {
// the main panel keeps everything together // the main panel keeps everything together
Panel mainPanel = new Panel(layout); Panel mainPanel = new Panel(layout);
GridBagConstraints contraintsPanel = new GridBagConstraints(); GridBagConstraints constraintsPanel = new GridBagConstraints();
contraintsPanel.gridx = 0; constraintsPanel.gridx = 0;
contraintsPanel.weightx = 1.0D; constraintsPanel.weightx = 1.0D;
contraintsPanel.weighty = 1.0D; constraintsPanel.weighty = 1.0D;
contraintsPanel.fill = GridBagConstraints.BOTH; constraintsPanel.fill = GridBagConstraints.BOTH;
contraintsPanel.insets = new Insets(0, 10, 0, 10); constraintsPanel.insets = new Insets(0, 10, 0, 10);
contraintsPanel.gridy = 0; constraintsPanel.gridy = 0;
GridBagConstraints constraintsButton = new GridBagConstraints(); GridBagConstraints constraintsButton = new GridBagConstraints();
constraintsButton.gridx = 0; constraintsButton.gridx = 0;
...@@ -307,7 +307,7 @@ ShutdownHandler { ...@@ -307,7 +307,7 @@ ShutdownHandler {
startBrowser.addActionListener(this); startBrowser.addActionListener(this);
startBrowser.setFont(font); startBrowser.setFont(font);
mainPanel.add(startBrowser, constraintsButton); mainPanel.add(startBrowser, constraintsButton);
frame.add(mainPanel, contraintsPanel); frame.add(mainPanel, constraintsPanel);
int width = 300, height = 120; int width = 300, height = 120;
frame.setSize(width, height); frame.setSize(width, height);
......
...@@ -420,7 +420,7 @@ public class Csv implements SimpleRowSource { ...@@ -420,7 +420,7 @@ public class Csv implements SimpleRowSource {
endOfLine = true; endOfLine = true;
break; break;
} else { } else {
// undelimited value // un-delimited value
StringBuffer buff = new StringBuffer(); StringBuffer buff = new StringBuffer();
buff.append((char) ch); buff.append((char) ch);
while (true) { while (true) {
...@@ -436,7 +436,7 @@ public class Csv implements SimpleRowSource { ...@@ -436,7 +436,7 @@ public class Csv implements SimpleRowSource {
} }
buff.append((char) ch); buff.append((char) ch);
} }
// check undelimited value for nullString // check un-delimited value for nullString
value = readNull(buff.toString().trim()); value = readNull(buff.toString().trim());
break; break;
} }
......
...@@ -157,16 +157,7 @@ java org.h2.test.TestAll timer ...@@ -157,16 +157,7 @@ java org.h2.test.TestAll timer
/* /*
test t
There is now an optimization for SELECT DISTINCT (see http://www.h2database.com/javadoc/org/h2/constant/SysProperties.html#h2.optimizeDistinct) so that the index is used. There are a few conditions:
- It must be as simple as: SELECT DISTINCT <column> FROM <table>
- The column must be indexed
- The selectivity must be quite low, that is, below 20. You need to run ANALYZE or set the selectivity manually.
I will add this to the docs.
remove old in use, links remove old in use, links
......
...@@ -64,7 +64,7 @@ public class XMLChecker { ...@@ -64,7 +64,7 @@ public class XMLChecker {
checkXML(s, !suffix.equals("xml")); checkXML(s, !suffix.equals("xml"));
} catch (Exception e) { } catch (Exception e) {
last = e; last = e;
System.out.println("ERROR: " + e.toString()); System.out.println("ERROR in file " + fileName + " " + e.toString());
} }
if (last != null) { if (last != null) {
last.printStackTrace(); last.printStackTrace();
......
...@@ -528,4 +528,11 @@ violate verysmallint eremainder iee cgi adjust estimation consumption occupy ikv ...@@ -528,4 +528,11 @@ violate verysmallint eremainder iee cgi adjust estimation consumption occupy ikv
simulates dispatcher servlets chf destruction separating consulting reached simulates dispatcher servlets chf destruction separating consulting reached
unreferenced longest enum jira jackcess track unreleased processors nearest fits shadow unreferenced longest enum jira jackcess track unreleased processors nearest fits shadow
cmu cosh tanh sinh contrib bzip contiguous huffman bitwise des cmu cosh tanh sinh contrib bzip contiguous huffman bitwise des
nederlands italy berlini destructor destruct elisabetta lobo gilbert william schoen remco docjar dutch website causing nederlands italy berlini destructor destruct elisabetta lobo gilbert william schoen remco docjar dutch website causing
\ No newline at end of file volunteers remoting werkzeugkasten claros bluedevel classification tolerant sqldeveloper banking novelist multiuser national codist partnership
manichord toolset donation profit david hibicius developing konqueror couple scala seam lack openhts oszone encorewiki chemical aspect
hibiscus book liftweb intertec utilizes uppermost transparent compounds sciences ohloh orion storybook ajax beans alternatives fitting hbci
lifespan sesar flexible institutes similarity myna interview substructure seasar neo responses orionserver frontend outperforms nih books solyp
expensive orm macromedia timed encore highlights health capabilities seaminaction ncgc smartfoxserver biological volunteer several volunteerbase
notes curves coldrick orf smart oriented usd genomics frameworks center dose communication fox packman fault life handles delimited willuhn sylvain
weighty gridx curation emptybrain cuaz gridy weightx jala
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论