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

Merge branch 'master' into Issue#479

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