提交 bc6d7692 authored 作者: Andrey Turbanov's avatar Andrey Turbanov

fix typos in comments and javadoc

上级 ea06d1f4
......@@ -18,7 +18,7 @@ FROM tableExpression [,...] [ WHERE expression ]
[ FOR UPDATE ]
","
Selects data from a table or multiple tables.
GROUP BY groups the the result by the given expression(s).
GROUP BY groups the result by the given expression(s).
HAVING filters rows after grouping.
ORDER BY sorts the result by the given column(s) or expression(s).
UNION combines the result of this query with the results of another query.
......@@ -1033,7 +1033,7 @@ CHECKPOINT
"Commands (Other)","CHECKPOINT SYNC","
CHECKPOINT SYNC
","
Flushes the data to disk and and forces all system buffers be written
Flushes the data to disk and forces all system buffers be written
to the underlying device.
Admin rights are required to execute this command.
......@@ -4026,7 +4026,7 @@ ROUNDMAGIC(numeric)
This function rounds numbers in a good way, but it is slow.
It has a special handling for numbers around 0.
Only numbers smaller or equal +/-1000000000000 are supported.
The value is converted to a String internally, and then the last last 4 characters are checked.
The value is converted to a String internally, and then the last 4 characters are checked.
'000x' becomes '0000' and '999x' becomes '999999', which is rounded automatically.
This method returns a double.
","
......@@ -4643,7 +4643,7 @@ DATEADD('MONTH', 1, DATE '2001-01-31')
"Functions (Time and Date)","DATEDIFF","
{ DATEDIFF | TIMESTAMPDIFF } (datetimeField, aDateAndTime, bDateAndTime)
","
Returns the the number of crossed unit boundaries between two date/time values.
Returns the number of crossed unit boundaries between two date/time values.
This method returns a long.
The datetimeField indicates the unit.
Only TIMEZONE_HOUR and TIMEZONE_MINUTE fields use the time zone offset component.
......@@ -5267,7 +5267,7 @@ SELECT * FROM TABLE(ID INT=(1, 2), NAME VARCHAR=('Hello', 'World'));
TRANSACTION_ID()
","
Returns the current transaction id for this session.
This method returns NULL if there is no uncommitted change, or if the the database is not persisted.
This method returns NULL if there is no uncommitted change, or if the database is not persisted.
Otherwise a value of the following form is returned:
""logFileId-position-sessionId"".
This method returns a string.
......
......@@ -1567,7 +1567,7 @@ The following file systems are included:
The default value is 1%.
</li></ul>
<p>
As an example, to use the the <code>nio</code> file system with PageStore storage engine,
As an example, to use the <code>nio</code> file system with PageStore storage engine,
use the following database URL: <code>jdbc:h2:nio:~/test;MV_STORE=FALSE</code>.
With MVStore storage engine nio file system is used by default.
</p>
......
......@@ -236,7 +236,7 @@ For the query <code>SELECT ID AS X FROM TEST</code> the method
return <code>X</code>. What's wrong?
</p>
<p>
This is not a bug. According the the JDBC specification, the method
This is not a bug. According the JDBC specification, the method
<code>ResultSetMetaData.getColumnName()</code> should return the name of the column
and not the alias name. If you need the alias name, use
<a href="https://docs.oracle.com/javase/7/docs/api/java/sql/ResultSetMetaData.html#getColumnLabel(int)"><code>ResultSetMetaData.getColumnLabel()</code></a>.
......@@ -256,7 +256,7 @@ For a table defined as <code>CREATE TABLE TEST(X FLOAT)</code> the method
return a <code>java.lang.Float</code>. What's wrong?
</p>
<p>
This is not a bug. According the the JDBC specification, the JDBC data type <code>FLOAT</code>
This is not a bug. According the JDBC specification, the JDBC data type <code>FLOAT</code>
is equivalent to <code>DOUBLE</code>, and both are mapped to <code>java.lang.Double</code>.
See also
<a href="https://docs.oracle.com/javase/1.5.0/docs/guide/jdbc/getstart/mapping.html#1055162">
......
......@@ -1013,7 +1013,7 @@ The application that opens the first connection to the database uses the embedde
which is faster than the server mode. Therefore the main application should open
the database first if possible. The first connection automatically starts a server on a random port.
This server allows remote connections, however only to this database (to ensure that,
the client reads <code>.lock.db</code> file and sends the the random key that is stored there to the server).
the client reads <code>.lock.db</code> file and sends the random key that is stored there to the server).
When the first connection is closed, the server stops. If other (remote) connections are still
open, one of them will then start a server (auto-reconnect is enabled automatically).
</p>
......@@ -1632,7 +1632,7 @@ is listed.
<h2 id="external_authentication">External authentication (Experimental)</h2>
<p>
External authentication allows to optionally validate user credentials externally (JAAS,LDAP,custom classes).
Is also possible to temporary assign roles to to externally authenticated users. <b>This feature is experimental and subject to change</b>
Is also possible to temporary assign roles to externally authenticated users. <b>This feature is experimental and subject to change</b>
</p>
<p>Master user cannot be externally authenticated</p>
<p>
......
......@@ -172,7 +172,7 @@ A map is sorted by key, and supports the common lookup operations,
including access to the first and last key, iterate over some or all keys, and so on.
</p><p>
Also supported, and very uncommon for maps, is fast index lookup:
the entries of the map can be be efficiently accessed like a random-access list
the entries of the map can be efficiently accessed like a random-access list
(get the entry at the given index), and the index of a key can be calculated efficiently.
That also means getting the median of two keys is very fast,
and a range of keys can be counted very quickly.
......@@ -535,7 +535,7 @@ H:2,block:2,blockSize:1000,chunk:7,created:1441235ef73,format:1,version:7,fletch
The data is stored in the form of a key-value pair.
Each value is stored as a hexadecimal number. The entries are:
</p>
<ul><li>H: The entry "H:2" stands for the the H2 database.
<ul><li>H: The entry "H:2" stands for the H2 database.
</li><li>block: The block number where one of the newest chunks starts
(but not necessarily the newest).
</li><li>blockSize: The block size of the file; currently always hex 1000, which is decimal 4096,
......
......@@ -598,7 +598,7 @@ The format used is similar to the profiling data generated when using <code>java
For this to work, the trace level needs to be 2 or higher (<code>TRACE_LEVEL_FILE=2</code>).
The easiest way to set the trace level is to append the setting to the database URL, for example:
<code>jdbc:h2:~/test;TRACE_LEVEL_FILE=2</code> or <code>jdbc:h2:tcp://localhost/~/test;TRACE_LEVEL_FILE=2</code>.
As an example, execute the the following script using the H2 Console:
As an example, execute the following script using the H2 Console:
</p>
<pre>
SET TRACE_LEVEL_FILE 2;
......
......@@ -779,7 +779,7 @@ If the TCP server is started within the <code>DbStarter</code>, it will also be
<h3>Using the H2 Console Servlet</h3>
<p>
The H2 Console is a standalone application and includes its own web server, but it can be
used as a servlet as well. To do that, include the the <code>h2*.jar</code> file in your application, and
used as a servlet as well. To do that, include the <code>h2*.jar</code> file in your application, and
add the following configuration to your <code>web.xml</code>:
</p>
<pre>
......
......@@ -74,7 +74,7 @@ import java.nio.ByteBuffer;
* </ul>
*<p>
* The first byte of the compressed stream is the control byte. For literal
* runs, the highest three bits of the control byte are not set, the the lower
* runs, the highest three bits of the control byte are not set, the lower
* bits are the literal run length, and the next bytes are data to copy directly
* into the output. For back-references, the highest three bits of the control
* byte are the back-reference length. If all three bits are set, then the
......
......@@ -2099,7 +2099,7 @@ public class Database implements DataHandler {
/**
* Check if this database is disk-based.
*
* @return true if it is disk-based, false it it is in-memory only.
* @return true if it is disk-based, false if it is in-memory only.
*/
public boolean isPersistent() {
return persistent;
......
......@@ -549,7 +549,7 @@ class ToDateTokenizer {
YYY(PARSLET_YEAR),
// 2-digit year
YY(PARSLET_YEAR),
// Two-digit century with with sign (- = B.C.)
// Two-digit century with sign (- = B.C.)
SCC(PARSLET_YEAR),
// Two-digit century.
CC(PARSLET_YEAR),
......
......@@ -9,6 +9,6 @@ Initial Developer: H2 Group
Javadoc package documentation
</title></head><body style="font: 9pt/130% Tahoma, Arial, Helvetica, sans-serif; font-weight: normal;"><p>
The native full text search implementation, and the wrapper for the the Lucene full text search implementation.
The native full text search implementation, and the wrapper for the Lucene full text search implementation.
</p></body></html>
\ No newline at end of file
......@@ -194,7 +194,7 @@ public class IndexCursor implements Cursor {
row = table.getTemplateRow();
} else if (row.getValue(columnId) != null) {
// if an object needs to overlap with both a and b,
// then it needs to overlap with the the union of a and b
// then it needs to overlap with the union of a and b
// (not the intersection)
ValueGeometry vg = (ValueGeometry) row.getValue(columnId).
convertTo(Value.GEOMETRY);
......
......@@ -179,7 +179,7 @@ public class PageDataIndex extends PageIndex {
}
/**
* Read an overflow page page.
* Read an overflow page.
*
* @param id the page id
* @return the page
......
......@@ -2864,7 +2864,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet, JdbcResultS
* @param rowNumber the row number. 0 is not allowed, 1 means the first row,
* 2 the second. -1 means the last row, -2 the row before the
* last row. If the value is too large, the position is moved
* after the last row, if if the value is too small it is moved
* after the last row, if the value is too small it is moved
* before the first row.
* @return true if there is a row available, false if not
* @throws SQLException if the result set is closed
......@@ -2896,7 +2896,7 @@ public class JdbcResultSet extends TraceObject implements ResultSet, JdbcResultS
*
* @param rowCount 0 means don't do anything, 1 is the next row, -1 the
* previous. If the value is too large, the position is moved
* after the last row, if if the value is too small it is moved
* after the last row, if the value is too small it is moved
* before the first row.
* @return true if there is a row available, false if not
* @throws SQLException if the result set is closed
......
......@@ -669,7 +669,7 @@ public class DbException extends RuntimeException {
* @param s print writer
*/
public static void printNextExceptions(SQLException e, PrintWriter s) {
// getNextException().printStackTrace(s) would be very very slow
// getNextException().printStackTrace(s) would be very slow
// if many exceptions are joined
int i = 0;
while ((e = e.getNextException()) != null) {
......@@ -688,7 +688,7 @@ public class DbException extends RuntimeException {
* @param s print stream
*/
public static void printNextExceptions(SQLException e, PrintStream s) {
// getNextException().printStackTrace(s) would be very very slow
// getNextException().printStackTrace(s) would be very slow
// if many exceptions are joined
int i = 0;
while ((e = e.getNextException()) != null) {
......
......@@ -578,7 +578,7 @@ public class MVStoreTool {
}
/**
* Roll back to a given revision into a a file called *.temp.
* Roll back to a given revision into a file called *.temp.
*
* @param fileName the file name
* @param targetVersion the version to roll back to (Long.MAX_VALUE for the
......
......@@ -25,7 +25,7 @@ import org.h2.mvstore.DataUtils;
* at most the specified amount of memory. The memory unit is not relevant,
* however it is suggested to use bytes as the unit.
* <p>
* This class implements an approximation of the the LIRS replacement algorithm
* This class implements an approximation of the LIRS replacement algorithm
* invented by Xiaodong Zhang and Song Jiang as described in
* http://www.cse.ohio-state.edu/~zhang/lirs-sigmetrics-02.html with a few
* smaller changes: An additional queue for non-resident entries is used, to
......
......@@ -33,7 +33,7 @@ import org.xml.sax.SAXException;
* Default authenticator implementation.
* <p>
* When client connectionInfo contains property AUTHREALM={realName} credentials
* (typically user id and password) are validated by by
* (typically user id and password) are validated by
* {@link org.h2.api.CredentialsValidator} configured for that realm.
* </p>
* <p>
......
......@@ -37,7 +37,7 @@ adminTranslateStart=Translate
helpAction=Action
helpAddAnotherRow=Add another row
helpAddDrivers=Adding Database Drivers
helpAddDriversText=Additional database drivers can be registered by adding the Jar file location of the driver to the the environment variables H2DRIVERS or CLASSPATH. Example (Windows): to add the database driver library C:/Programs/hsqldb/lib/hsqldb.jar, set the environment variable H2DRIVERS to C:/Programs/hsqldb/lib/hsqldb.jar.
helpAddDriversText=Additional database drivers can be registered by adding the Jar file location of the driver to the environment variables H2DRIVERS or CLASSPATH. Example (Windows): to add the database driver library C:/Programs/hsqldb/lib/hsqldb.jar, set the environment variable H2DRIVERS to C:/Programs/hsqldb/lib/hsqldb.jar.
helpAddRow=Add a new row
helpCommandHistory=Shows the Command History
helpCreateTable=Create a new table
......
......@@ -189,7 +189,7 @@ public class PageStore implements CacheWriter {
/**
* The change count is something like a "micro-transaction-id".
* It is used to ensure that changed pages are not written to the file
* before the the current operation is not finished. This is only a problem
* before the current operation is not finished. This is only a problem
* when using a very small cache size. The value starts at 1 so that
* pages with change count 0 can be evicted from the cache.
*/
......
......@@ -14,7 +14,7 @@ import org.h2.message.Trace;
import org.h2.message.TraceSystem;
/**
* The writer thread is responsible to flush the transaction transaction log
* The writer thread is responsible to flush the transaction log
* from time to time.
*/
public class WriterThread implements Runnable {
......
......@@ -307,7 +307,7 @@ public abstract class FilePath {
/**
* Convert a file to a path. This is similar to
* <code>java.nio.file.spi.FileSystemProvider.getPath</code>, but may
* return an object even if the scheme doesn't match in case of the the
* return an object even if the scheme doesn't match in case of the
* default file provider.
*
* @param path the path
......
......@@ -656,7 +656,7 @@ public class Column {
/**
* Add a check constraint expression to this column. An existing check
* constraint constraint is added using AND.
* constraint is added using AND.
*
* @param session the session
* @param expr the (additional) constraint
......
......@@ -19,7 +19,7 @@ import org.h2.value.Value;
/**
* The table SYSTEM_RANGE is a virtual table that generates incrementing numbers
* with a given start end end point.
* with a given start end point.
*/
public class RangeTable extends Table {
......
......@@ -188,7 +188,7 @@ public class TableFilter implements ColumnResolver {
}
/**
* Get the best plan item (index, cost) to use use for the current join
* Get the best plan item (index, cost) to use for the current join
* order.
*
* @param s the session
......
......@@ -93,7 +93,7 @@ public class Backup extends Tool {
* @param zipFileName the name of the target backup file (including path)
* @param directory the source directory name
* @param db the source database name (null if there is only one database,
* and and empty string to backup all files in this directory)
* and empty string to backup all files in this directory)
* @param quiet don't print progress information
*/
public static void execute(String zipFileName, String directory, String db,
......
......@@ -817,7 +817,7 @@ public class Csv implements SimpleRowSource {
* INTERNAL.
* Parse and set the CSV options.
*
* @param options the the options
* @param options the options
* @return the character set
*/
public String setOptions(String options) {
......
......@@ -165,7 +165,7 @@ public class Recover extends Tool implements DataHandler {
* open the database and can be used even if the database files are
* corrupted. A database can get corrupted if there is a bug in the database
* engine or file system software, or if an application writes into the
* database file that doesn't understand the the file format, or if there is
* database file that doesn't understand the file format, or if there is
* a hardware problem.
*
* @param args the command line arguments
......
......@@ -81,7 +81,7 @@ public class IntArray {
}
/**
* Ensure the the underlying array is large enough for the given number of
* Ensure the underlying array is large enough for the given number of
* entries.
*
* @param minCapacity the minimum capacity
......
......@@ -197,7 +197,7 @@ public class NetUtils {
return true;
}
InetAddress localhost = InetAddress.getLocalHost();
// localhost.getCanonicalHostName() is very very slow
// localhost.getCanonicalHostName() is very slow
String host = localhost.getHostAddress();
for (InetAddress addr : InetAddress.getAllByName(host)) {
if (test.equals(addr)) {
......
......@@ -203,7 +203,7 @@ public class CompareMode implements Comparator<Value> {
}
/**
* Compare name name of the locale with the given name. The case of the name
* Compare name of the locale with the given name. The case of the name
* is ignored.
*
* @param locale the locale
......
......@@ -1328,7 +1328,7 @@ public class DataType {
/**
* Check whether a given object is a Geometry object.
*
* @param x the the object
* @param x the object
* @return true if it is a Geometry object
*/
public static boolean isGeometry(Object x) {
......
......@@ -813,7 +813,7 @@ public class Transfer {
}
/**
* Open a new new connection to the same address and port as this one.
* Open a new connection to the same address and port as this one.
*
* @return the new transfer object
*/
......
......@@ -7,7 +7,7 @@
-------------------------------------------------------------------------------
-- Optimize Count Star
-------------------------------------------------------------------------------
-- This code snippet shows how to quickly get the the number of rows in a table.
-- This code snippet shows how to quickly get the number of rows in a table.
-- Initialize the data
CREATE TABLE TEST(ID INT PRIMARY KEY);
......@@ -118,7 +118,7 @@ INSERT INTO TEST SELECT X, MOD(X, 5), RAND()*100 FROM SYSTEM_RANGE(1, 1000);
-- Create an index on the columns TYPE and VALUE
CREATE INDEX IDX_TEST_TYPE_VALUE ON TEST(TYPE, VALUE);
-- Analyze to optimize the DISTINCT part of the query query
-- Analyze to optimize the DISTINCT part of the query
ANALYZE;
-- Query the largest and smallest value - this is optimized
......
......@@ -185,7 +185,7 @@ public class TestMergeUsing extends TestDb implements Trigger {
// SQL standard says duplicate or repeated updates of same row in same
// statement should cause errors - but because first row is updated,
// deleted (on source row 1) then inserted (on source row 2)
// it's considered different - with respect to to ROWID - so no error
// it's considered different - with respect to ROWID - so no error
// One insert, one update one delete happens (on same row) , target
// table missing PK, no source or target alias
if (false) // TODO
......
......@@ -67,7 +67,7 @@ No optimization for COUNT(*)
Derby
--------------------------------------------------------------------------------------------------------
To call getFD().sync() (which results in the OS call fsync()),
set the system property derby.storage.fileSyncTransactionLog to true true.
set the system property derby.storage.fileSyncTransactionLog to true.
See
http://db.apache.org/derby/javadoc/engine/org/apache/derby/iapi/reference/Property.html#FILESYNC_TRANSACTION_LOG
Missing features:
......
......@@ -12,7 +12,7 @@ import java.util.Set;
import org.h2.mvstore.MVMap;
/**
* A custom map returning the keys and values values 1 .. 10.
* A custom map returning the keys and values 1 .. 10.
*/
public class SequenceMap extends MVMap<Long, Long> {
......
......@@ -275,7 +275,7 @@ public class TestCacheLIRS extends TestBase {
verify(test, "mem: 4 stack: 2 3 4 6 cold: non-resident: 5 0");
test.put(0, 0);
test.put(1, 10);
// the the stack was not pruned, the following will fail
// the stack was not pruned, the following will fail
verify(test, "mem: 5 stack: 1 0 2 3 4 cold: 1 non-resident: 6 5");
}
......
......@@ -279,7 +279,7 @@ public class TestCacheLongKeyLIRS extends TestBase {
verify(test, "mem: 4 stack: 2 3 4 6 cold: non-resident: 5 0");
test.put(0, 0);
test.put(1, 10);
// the the stack was not pruned, the following will fail
// the stack was not pruned, the following will fail
verify(test, "mem: 5 stack: 1 0 2 3 4 cold: 1 non-resident: 6 5");
}
......
......@@ -886,7 +886,7 @@ public class Build extends BuildBase {
/**
* Build the jar file without downloading any files over the network. If the
* required files are missing, they are are listed, and the jar file is not
* required files are missing, they are listed, and the jar file is not
* built.
*/
@Description(summary = "Build H2 jar avoiding downloads (list missing files).")
......
......@@ -82,7 +82,7 @@ public class AbbaDetect {
}
private static String enable(String source) {
// the word synchronized within single line comments comments
// the word synchronized within single line comments
source = source.replaceAll("(// .* synchronized )([^ ])", "$1 $2");
source = source.replaceAll("synchronized \\((.*)\\(\\)\\)",
......
......@@ -24,7 +24,7 @@ import java.util.Set;
* at most the specified amount of memory. The memory unit is not relevant,
* however it is suggested to use bytes as the unit.
* <p>
* This class implements an approximation of the the LIRS replacement algorithm
* This class implements an approximation of the LIRS replacement algorithm
* invented by Xiaodong Zhang and Song Jiang as described in
* http://www.cse.ohio-state.edu/~zhang/lirs-sigmetrics-02.html with a few
* smaller changes: An additional queue for non-resident entries is used, to
......
......@@ -143,7 +143,7 @@ public class InPlaceStableQuicksort<T> {
* @param pivot the pivot
* @param from the index of the first element
* @param to the index of the last element
* @return the the first element of the second partition
* @return the first element of the second partition
*/
private int partition(T pivot, int from, int to) {
if (to - from < temp.length) {
......@@ -163,7 +163,7 @@ public class InPlaceStableQuicksort<T> {
* @param pivot the pivot
* @param from the index of the first element
* @param to the index of the last element
* @return the the first element of the second partition
* @return the first element of the second partition
*/
private int partitionSmall(T pivot, int from, int to) {
int tempIndex = 0, dataIndex = from;
......
......@@ -294,7 +294,7 @@ class OpExpr extends ExprBase {
return "(((u" + left.getType() + ") " + left + ") >> " + right + ")";
} else if (op.equals("+")) {
if (left.getType().isObject() || right.getType().isObject()) {
// TODO convert primitive to to String, call toString
// TODO convert primitive to String, call toString
StringBuilder buff = new StringBuilder();
if (type.refCount) {
buff.append("ptr<java_lang_StringBuilder>(new java_lang_StringBuilder(");
......
......@@ -45,7 +45,7 @@ These railroad diagrams are based on the
</p><p>
The diagrams are created with a small <a href="Create.java">Java program</a>
and this <a href="help.csv">BNF</a>. The program uses the BNF parser / converter
of the the <a href="http://www.h2database.com">H2 database engine</a>.
of the <a href="http://www.h2database.com">H2 database engine</a>.
</p><p>
Please send feedback to the <a href="http://jackrabbit.apache.org/mailing-lists.html">Jackrabbit User List</a>.
</p>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论