提交 64a622bf authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 baf60c6e
...@@ -123,8 +123,8 @@ public abstract class Command implements CommandInterface { ...@@ -123,8 +123,8 @@ public abstract class Command implements CommandInterface {
public void cancel() { public void cancel() {
this.cancel = true; this.cancel = true;
} }
public String getSQL() { public String getSQL() {
return null; return null;
} }
} }
...@@ -744,16 +744,16 @@ public class Parser { ...@@ -744,16 +744,16 @@ public class Parser {
String querySQL = query.getSQL(); String querySQL = query.getSQL();
Session s; Session s;
if(prepared != null && prepared instanceof CreateView) { if(prepared != null && prepared instanceof CreateView) {
s = database.getSystemSession(); s = database.getSystemSession();
} else { } else {
s = session; s = session;
} }
String tempViewName = s.getNextTempViewName(); String tempViewName = s.getNextTempViewName();
table = new TableView(mainSchema, 0, tempViewName, querySQL, query.getParameters(), null, s, false); table = new TableView(mainSchema, 0, tempViewName, querySQL, query.getParameters(), null, s, false);
if(s != database.getSystemSession()) { if(s != database.getSystemSession()) {
table.setOnCommitDrop(true); table.setOnCommitDrop(true);
} }
s.addLocalTempTable(table); s.addLocalTempTable(table);
read(")"); read(")");
} else { } else {
TableFilter top = readTableFilter(fromOuter); TableFilter top = readTableFilter(fromOuter);
...@@ -2062,8 +2062,8 @@ public class Parser { ...@@ -2062,8 +2062,8 @@ public class Parser {
read(); read();
} }
if (".".equals(currentToken) && schemaName.equals(database.getShortName())) { if (".".equals(currentToken) && schemaName.equals(database.getShortName())) {
read("."); read(".");
schemaName = s; schemaName = s;
if (currentTokenType != IDENTIFIER) { if (currentTokenType != IDENTIFIER) {
throw Message.getSyntaxError(sqlCommand, parseIndex, "identifier"); throw Message.getSyntaxError(sqlCommand, parseIndex, "identifier");
} }
......
...@@ -279,7 +279,7 @@ public class Select extends Query { ...@@ -279,7 +279,7 @@ public class Select extends Query {
Expression expr = (Expression) expressions.get(i); Expression expr = (Expression) expressions.get(i);
int testing; int testing;
if(expr == null) { if(expr == null) {
System.out.println("stop"); System.out.println("stop");
} }
row[i] = expr.getValue(session); row[i] = expr.getValue(session);
} }
...@@ -591,8 +591,8 @@ if(expr == null) { ...@@ -591,8 +591,8 @@ if(expr == null) {
} }
} }
if(having != null) { if(having != null) {
// could be set after addGlobalCondition // could be set after addGlobalCondition
// in this case the query is not run directly, just getPlanSQL is called // in this case the query is not run directly, just getPlanSQL is called
Expression h = having; Expression h = having;
buff.append("\nHAVING " + StringUtils.unEnclose(h.getSQL())); buff.append("\nHAVING " + StringUtils.unEnclose(h.getSQL()));
} else if(havingIndex >= 0) { } else if(havingIndex >= 0) {
...@@ -683,10 +683,10 @@ if(expr == null) { ...@@ -683,10 +683,10 @@ if(expr == null) {
Expression comp = new Comparison(session, comparisonType, col, expr); Expression comp = new Comparison(session, comparisonType, col, expr);
comp = comp.optimize(session); comp = comp.optimize(session);
if(isGroupQuery) { if(isGroupQuery) {
if(havingIndex >= 0) { if(havingIndex >= 0) {
having = (Expression) expressions.get(havingIndex); having = (Expression) expressions.get(havingIndex);
} }
if(having == null) { if(having == null) {
having = comp; having = comp;
} else { } else {
having = new ConditionAndOr(ConditionAndOr.AND, having, comp); having = new ConditionAndOr(ConditionAndOr.AND, having, comp);
......
...@@ -40,12 +40,12 @@ public class JdbcSQLException extends SQLException { ...@@ -40,12 +40,12 @@ public class JdbcSQLException extends SQLException {
} }
private static String buildMessage(String message, String sql, String state) { private static String buildMessage(String message, String sql, String state) {
StringBuffer buff = new StringBuffer(message); StringBuffer buff = new StringBuffer(message);
if(sql != null) { if(sql != null) {
buff.append("; SQL statement: "); buff.append("; SQL statement: ");
buff.append(sql); buff.append(sql);
} }
return message + " [" + state + "-" + Constants.BUILD_ID + "]"; return message + " [" + state + "-" + Constants.BUILD_ID + "]";
} }
/** /**
...@@ -127,7 +127,7 @@ public class JdbcSQLException extends SQLException { ...@@ -127,7 +127,7 @@ public class JdbcSQLException extends SQLException {
* @return the SQL statement * @return the SQL statement
*/ */
public String getSQL() { public String getSQL() {
return sql; return sql;
} }
/** /**
......
...@@ -254,11 +254,11 @@ public class Schema extends DbObject { ...@@ -254,11 +254,11 @@ public class Schema extends DbObject {
} }
public TableData createTable(String tempName, int id, ObjectArray newColumns, boolean persistent) throws SQLException { public TableData createTable(String tempName, int id, ObjectArray newColumns, boolean persistent) throws SQLException {
return new TableData(this, tempName, id, newColumns, persistent); return new TableData(this, tempName, id, newColumns, persistent);
} }
public TableLink createTableLink(int id, String tableName, String driver, String url, String user, String password, String originalTable, boolean emitUpdates, boolean force) throws SQLException { public TableLink createTableLink(int id, String tableName, String driver, String url, String user, String password, String originalTable, boolean emitUpdates, boolean force) throws SQLException {
return new TableLink(this, id, tableName, driver, url, user, password, originalTable, emitUpdates, force); return new TableLink(this, id, tableName, driver, url, user, password, originalTable, emitUpdates, force);
} }
} }
...@@ -83,7 +83,7 @@ public class LogFile { ...@@ -83,7 +83,7 @@ public class LogFile {
} }
String s = fileName.substring(fileNamePrefix.length()+1, fileName.length()-Constants.SUFFIX_LOG_FILE.length()); String s = fileName.substring(fileNamePrefix.length()+1, fileName.length()-Constants.SUFFIX_LOG_FILE.length());
int id = Integer.parseInt(s); int id = Integer.parseInt(s);
return new LogFile(log, id, fileNamePrefix); return new LogFile(log, id, fileNamePrefix);
} }
public String getFileName() { public String getFileName() {
......
...@@ -220,7 +220,7 @@ public class LogSystem { ...@@ -220,7 +220,7 @@ public class LogSystem {
String s = list[i]; String s = list[i];
LogFile l = null; LogFile l = null;
try { try {
l = LogFile.openIfLogFile(this, fileNamePrefix, s); l = LogFile.openIfLogFile(this, fileNamePrefix, s);
} catch(SQLException e) { } catch(SQLException e) {
database.getTrace(Trace.LOG).debug("Error opening log file, header corrupt: "+s, e); database.getTrace(Trace.LOG).debug("Error opening log file, header corrupt: "+s, e);
// this can happen if the system crashes just after creating a new file (before writing the header) // this can happen if the system crashes just after creating a new file (before writing the header)
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
package org.h2.util; package org.h2.util;
public class ClassUtils { public class ClassUtils {
public static Class loadClass(String className) throws ClassNotFoundException { public static Class loadClass(String className) throws ClassNotFoundException {
// TODO support special syntax to load classes using another classloader // TODO support special syntax to load classes using another classloader
return Class.forName(className); return Class.forName(className);
......
...@@ -69,7 +69,7 @@ public class ShowProgress implements DatabaseEventListener { ...@@ -69,7 +69,7 @@ public class ShowProgress implements DatabaseEventListener {
} }
public void exceptionThrown(SQLException e, String sql) { public void exceptionThrown(SQLException e, String sql) {
System.out.println("Error executing " + sql); System.out.println("Error executing " + sql);
e.printStackTrace(); e.printStackTrace();
} }
......
...@@ -40,7 +40,7 @@ public class TestHaltApp extends TestHalt { ...@@ -40,7 +40,7 @@ public class TestHaltApp extends TestHalt {
protected void testWaitAfterAppStart() throws Exception { protected void testWaitAfterAppStart() throws Exception {
int sleep = 10 + random.nextInt(300); int sleep = 10 + random.nextInt(300);
if((flags & FLAG_NO_DELAY) == 0) { if((flags & FLAG_NO_DELAY) == 0) {
sleep += 1000; sleep += 1000;
} }
Thread.sleep(sleep); Thread.sleep(sleep);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论