提交 cf363b47 authored 作者: StuMc's avatar StuMc 提交者: GitHub

Merge branch 'master' into Issue#479

......@@ -4,7 +4,7 @@
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.194-SNAPSHOT</version>
<version>1.4.195-SNAPSHOT</version>
<packaging>jar</packaging>
<name>H2 Database Engine</name>
<url>http://www.h2database.com</url>
......
......@@ -21,6 +21,8 @@ Change Log
<h2>Next Version (unreleased)</h2>
<ul>
<li>Fix startup issue when using "CHECK" as a column name.
</li>
<li>Issue #423: ANALYZE performed multiple times on one table during execution of the same statement.
</li>
<li>Issue #426: Support ANALYZE TABLE statement
......@@ -199,6 +201,8 @@ changed from Types.OTHER (1111) to Types.TIMESTAMP_WITH_TIMEZONE (2014)
<h2>Version 1.4.192 Beta (2016-05-26)</h2>
<ul>
<li>Java 6 is no longer supported (the jar files are compiled for Java 7).
</li>
<li>Garbage collection of unused chunks should now be faster.
</li>
<li>Prevent people using unsupported combination of auto-increment columns and clustering mode.
......
......@@ -3887,7 +3887,11 @@ public class Parser {
private static int getSaveTokenType(String s, boolean supportOffsetFetch) {
switch (s.charAt(0)) {
case 'C':
if (s.equals("CURRENT_TIMESTAMP")) {
if (s.equals("CHECK")) {
return KEYWORD;
} if (s.equals("CONSTRAINT")) {
return KEYWORD;
} else if (s.equals("CURRENT_TIMESTAMP")) {
return CURRENT_TIMESTAMP;
} else if (s.equals("CURRENT_TIME")) {
return CURRENT_TIME;
......@@ -3907,6 +3911,8 @@ public class Parser {
return KEYWORD;
} else if ("FOR".equals(s)) {
return KEYWORD;
} else if ("FOREIGN".equals(s)) {
return KEYWORD;
} else if ("FULL".equals(s)) {
return KEYWORD;
} else if (supportOffsetFetch && "FETCH".equals(s)) {
......@@ -3918,7 +3924,9 @@ public class Parser {
case 'H':
return getKeywordOrIdentifier(s, "HAVING", KEYWORD);
case 'I':
if ("INNER".equals(s)) {
if ("INDEX".equals(s)) {
return KEYWORD;
} if ("INNER".equals(s)) {
return KEYWORD;
} else if ("INTERSECT".equals(s)) {
return KEYWORD;
......@@ -3926,6 +3934,8 @@ public class Parser {
return getKeywordOrIdentifier(s, "IS", KEYWORD);
case 'J':
return getKeywordOrIdentifier(s, "JOIN", KEYWORD);
case 'K':
return getKeywordOrIdentifier(s, "KEY", KEYWORD);
case 'L':
if ("LIMIT".equals(s)) {
return KEYWORD;
......@@ -3936,6 +3946,8 @@ public class Parser {
case 'N':
if ("NOT".equals(s)) {
return KEYWORD;
} else if ("NOCHECK".equals(s)) {
return KEYWORD;
} else if ("NATURAL".equals(s)) {
return KEYWORD;
}
......
......@@ -1696,8 +1696,9 @@ public class Session extends SessionWithState {
}
/**
* Marks a table as changed, needing re-analysis.
* @param table the table to be marked
* Mark that the given table needs to be analyzed on commit.
*
* @param table the table
*/
public void markTableForAnalyze(Table table) {
if (tablesToAnalyze == null) {
......
......@@ -74,6 +74,7 @@ public class IndexType {
/**
* Create an affinity index.
*
* @return the index type
*/
public static IndexType createAffinity() {
IndexType type = new IndexType();
......
......@@ -735,7 +735,6 @@ public class MVTable extends TableBase {
if (n > 0) {
nextAnalyze = n;
}
int rows = session.getDatabase().getSettings().analyzeSample / 10;
session.markTableForAnalyze(this);
}
......
......@@ -52,9 +52,10 @@ public class LinkSchema {
stat = conn.createStatement();
stat.execute("CREATE SCHEMA IF NOT EXISTS " +
StringUtils.quoteIdentifier(targetSchema));
//Workaround for PostgreSQL to avoid index names
//Workaround for PostgreSQL to avoid index names
if (url.startsWith("jdbc:postgresql:")) {
rs = c2.getMetaData().getTables(null, sourceSchema, null, new String[]{"TABLE", "LINKED TABLE", "VIEW", "EXTERNAL"});
rs = c2.getMetaData().getTables(null, sourceSchema, null,
new String[] { "TABLE", "LINKED TABLE", "VIEW", "EXTERNAL" });
} else {
rs = c2.getMetaData().getTables(null, sourceSchema, null, null);
}
......
......@@ -2018,7 +2018,8 @@ public class TestFunctions extends TestBase implements AggregateFunction {
Statement stat = conn.createStatement();
final ResultSet rs = stat.executeQuery(
"select ROUND(-1.2), ROUND(-1.5), ROUND(-1.6), ROUND(2), ROUND(1.5), ROUND(1.8), ROUND(1.1) from dual");
"select ROUND(-1.2), ROUND(-1.5), ROUND(-1.6), " +
"ROUND(2), ROUND(1.5), ROUND(1.8), ROUND(1.1) from dual");
rs.next();
assertEquals(-1, rs.getInt(1));
......
......@@ -1173,8 +1173,8 @@ public class TestTableEngines extends TestBase {
@Override
public double getCost(Session session, int[] masks,
TableFilter[] filters, int filter, SortOrder sortOrder,
HashSet<Column> allColumnsSet) {
TableFilter[] filters, int filter, SortOrder sortOrder,
HashSet<Column> allColumnsSet) {
return 0;
}
......
......@@ -16,8 +16,8 @@ import java.io.RandomAccessFile;
*/
public class CheckJavadoc {
private static final int MAX_COMMENT_LINE_SIZE = 80;
private static final int MAX_SOURCE_LINE_SIZE = 100;
private static final int MAX_COMMENT_LINE_SIZE = 100;
private static final int MAX_SOURCE_LINE_SIZE = 120;
private int errorCount;
/**
......
......@@ -17,7 +17,7 @@ import java.util.Arrays;
*/
public class CheckTextFiles {
private static final int MAX_SOURCE_LINE_SIZE = 100;
private static final int MAX_SOURCE_LINE_SIZE = 120;
// must contain "+" otherwise this here counts as well
private static final String COPYRIGHT = "Copyright 2004-2014 " +
......
......@@ -735,3 +735,4 @@ optimisations roughly contractid succeeding tran fixme iters ovain orgid chosen
arbonaut exposing obscure determined turkey buildings indexhints acct
choosing optimise arte preparator katzyn bla jenkins tot artes pgserver npe
suffers closeablem mni significance vise identiy vitalus aka ilike uppercasing reentrant
aff ignite warm upstream producing sfu jit smtm affinity stashed tbl
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论