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