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

Documentation.

上级 43701f3f
......@@ -138,7 +138,7 @@ should never be used for columns with a maximum size below about 200 bytes.
The best threshold depends on the use case; reading in-place objects is faster
than reading from separate files, but slows down the performance of operations
that don't involve this column.
<p>
</p><p>
It is possible to configure the database to store LOB objects outside the database file,
see the <a href="../javadoc/org/h2/constant/SysProperties.html#h2.lobInDatabase">h2.lobInDatabase</a> property.
</p>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -96,8 +96,8 @@ public class CreateView extends SchemaCommand {
}
querySQL = select.getPlanSQL();
}
// The view creates a Prepared command object, which belongs to a session, so we pass
// the system session down.
// The view creates a Prepared command object, which belongs to a
// session, so we pass the system session down.
Session sysSession = db.getSystemSession();
try {
if (view == null) {
......
......@@ -45,7 +45,8 @@ public class LobStorageFrontend implements LobStorageInterface {
*/
@Override
public void removeLob(long lob) {
// TODO this should not be called at all, but that's a refactoring for another day
// TODO this should not be called at all,
// but that's a refactoring for another day
}
/**
......
......@@ -54,7 +54,8 @@ public interface LobStorageInterface {
* @param byteCount the number of bytes to read, or -1 if not known
* @return the stream
*/
InputStream getInputStream(long lobId, byte[] hmac, long byteCount) throws IOException;
InputStream getInputStream(long lobId, byte[] hmac, long byteCount)
throws IOException;
/**
* Set the table reference of this lob.
......
/*
* Copyright 2004-2013 H2 Group. Multiple-Licensed under the H2 License,
* Version 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
package org.h2.store;
import java.io.IOException;
......
......@@ -265,8 +265,8 @@ public class SourceCompiler {
/**
* Access the groovy compiler using reflection, so that we do not gain a compile-time dependency
* unnecessarily.
* Access the Groovy compiler using reflection, so that we do not gain a
* compile-time dependency unnecessarily.
*/
private static final class GroovyCompiler {
private static final Object LOADER;
......@@ -279,12 +279,13 @@ public class SourceCompiler {
// create an instance of ImportCustomizer
Class<?> importCustomizerClass = Class.forName("org.codehaus.groovy.control.customizers.ImportCustomizer");
Object importCustomizer = Utils.newInstance("org.codehaus.groovy.control.customizers.ImportCustomizer");
// Call the method ImportCustomizer#addImports(String[])
// Call the method ImportCustomizer.addImports(String[])
String[] importsArray = new String[] { "java.sql.Connection", "java.sql.Types", "java.sql.ResultSet",
"groovy.sql.Sql", "org.h2.tools.SimpleResultSet" };
Utils.callMethod(importCustomizer, "addImports", new Object[] { importsArray });
// Call the method CompilerConfiguration#addCompilationCustomizers(ImportCustomizer...)
// Call the method
// CompilerConfiguration.addCompilationCustomizers(ImportCustomizer...)
Object importCustomizerArray = java.lang.reflect.Array.newInstance(importCustomizerClass, 1);
java.lang.reflect.Array.set(importCustomizerArray, 0, importCustomizer);
Object configuration = Utils.newInstance("org.codehaus.groovy.control.CompilerConfiguration");
......
......@@ -31,7 +31,8 @@ import org.h2.util.StringUtils;
import org.h2.util.Utils;
/**
* An alternate LOB implementation, where LOB data is stored inside the database, instead of in external files.
* An alternate LOB implementation, where LOB data is stored inside the
* database, instead of in external files.
*/
public class ValueLobDb extends Value implements Value.ValueClob, Value.ValueBlob {
......@@ -504,7 +505,8 @@ public class ValueLobDb extends Value implements Value.ValueClob, Value.ValueBlo
}
}
private void createTempFromStream(byte[] buff, int len, InputStream in, long remaining, DataHandler h) throws IOException {
private void createTempFromStream(byte[] buff, int len, InputStream in,
long remaining, DataHandler h) throws IOException {
FileStoreOutputStream out = initTemp(h);
boolean compress = h.getLobCompressionAlgorithm(Value.BLOB) != null;
try {
......
......@@ -100,8 +100,10 @@ public class TestCluster extends TestBase {
String url2 = "jdbc:h2:tcp://localhost:" + port2 + "/test";
String urlCluster = "jdbc:h2:tcp://" + serverList + "/test";
Server server1 = org.h2.tools.Server.createTcpServer("-tcpPort", "" + port1, "-baseDir", getBaseDir() + "/node1").start();
Server server2 = org.h2.tools.Server.createTcpServer("-tcpPort", "" + port2 , "-baseDir", getBaseDir() + "/node2").start();
Server server1 = org.h2.tools.Server.createTcpServer(
"-tcpPort", "" + port1, "-baseDir", getBaseDir() + "/node1").start();
Server server2 = org.h2.tools.Server.createTcpServer(
"-tcpPort", "" + port2 , "-baseDir", getBaseDir() + "/node2").start();
CreateCluster.main("-urlSource", url1, "-urlTarget", url2, "-user", user, "-password", password, "-serverList",
serverList);
......
......@@ -95,21 +95,6 @@ int test;
PreparedStatement prep = conn
.prepareStatement("insert into test values(?, ?)");
// -mx4g
// fast size
// 10 / 800000
// 1272 mvstore;LOCK_MODE=0 before
// 1449 mvstore;LOCK_MODE=0 after
// 1076 mvstore;DEFAULT_TABLE_ENGINE=org.h2.mvstore.db.MVTableEngine;LOCK_MODE=0;LOG=0 before
// 1086 mvstore;DEFAULT_TABLE_ENGINE=org.h2.mvstore.db.MVTableEngine;LOCK_MODE=0;LOG=0 after
// 100 / 800000
// 2010 mvstore;LOCK_MODE=0 before
// 2261 mvstore;LOCK_MODE=0 after
// 1536 mvstore;DEFAULT_TABLE_ENGINE=org.h2.mvstore.db.MVTableEngine;LOCK_MODE=0;LOG=0 before
// 1546 mvstore;DEFAULT_TABLE_ENGINE=org.h2.mvstore.db.MVTableEngine;LOCK_MODE=0;LOG=0 after
prep.setString(2, new String(new char[10]).replace((char) 0, 'x'));
// for (int i = 0; i < 20000; i++) {
for (int i = 0; i < 800000; i++) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论