提交 9646d854 authored 作者: Thomas Mueller's avatar Thomas Mueller

Changes to prepare for version 1.4.x beta

上级 183fcbbd
......@@ -13,10 +13,8 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.Properties;
import org.h2.api.ErrorCode;
import org.h2.command.dml.SetTypes;
import org.h2.constant.DbSettings;
import org.h2.constant.ErrorCode;
import org.h2.constant.SysProperties;
import org.h2.message.DbException;
import org.h2.security.SHA256;
import org.h2.store.fs.FilePathEncrypt;
......@@ -385,6 +383,15 @@ public class ConnectionInfo implements Cloneable {
public String getName() {
if (persistent) {
if (nameNormalized == null) {
if (!SysProperties.IMPLICIT_RELATIVE_PATH) {
if (!FileUtils.isAbsolute(name) && name.indexOf("./") < 0) {
// the name could start with "./", or
// it could start with a prefix such as "nio:./"
throw DbException.get(
ErrorCode.URL_RELATIVE_TO_CWD,
originalURL);
}
}
String suffix = Constants.SUFFIX_PAGE_FILE;
String n;
if (FileUtils.exists(name + suffix)) {
......
......@@ -16,12 +16,10 @@ import java.util.Properties;
import java.util.Set;
import java.util.StringTokenizer;
import org.h2.api.DatabaseEventListener;
import org.h2.api.ErrorCode;
import org.h2.api.JavaObjectSerializer;
import org.h2.command.ddl.CreateTableData;
import org.h2.command.dml.SetTypes;
import org.h2.constant.DbSettings;
import org.h2.constant.ErrorCode;
import org.h2.constant.SysProperties;
import org.h2.constraint.Constraint;
import org.h2.index.Cursor;
import org.h2.index.Index;
......@@ -194,7 +192,7 @@ public class Database implements DataHandler {
String name = ci.getName();
this.dbSettings = ci.getDbSettings();
this.reconnectCheckDelay = dbSettings.reconnectCheckDelay;
this.compareMode = CompareMode.getInstance(null, 0, false);
this.compareMode = CompareMode.getInstance(null, 0);
this.persistent = ci.isPersistent();
this.filePasswordHash = ci.getFilePasswordHash();
this.fileEncryptionKey = ci.getFileEncryptionKey();
......
差异被折叠。
......@@ -7,12 +7,11 @@
package org.h2.engine;
import java.util.HashMap;
import org.h2.api.ErrorCode;
import org.h2.command.CommandInterface;
import org.h2.command.Parser;
import org.h2.command.dml.SetTypes;
import org.h2.constant.DbSettings;
import org.h2.constant.ErrorCode;
import org.h2.constant.SysProperties;
import org.h2.message.DbException;
import org.h2.store.FileLock;
import org.h2.util.MathUtils;
......
......@@ -14,9 +14,8 @@ import java.sql.Connection;
import java.util.ArrayList;
import java.util.Arrays;
import org.h2.Driver;
import org.h2.api.ErrorCode;
import org.h2.command.Parser;
import org.h2.constant.ErrorCode;
import org.h2.constant.SysProperties;
import org.h2.expression.Expression;
import org.h2.message.DbException;
import org.h2.message.Trace;
......
......@@ -12,13 +12,12 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.Random;
import org.h2.api.ErrorCode;
import org.h2.command.Command;
import org.h2.command.CommandInterface;
import org.h2.command.Parser;
import org.h2.command.Prepared;
import org.h2.command.dml.SetTypes;
import org.h2.constant.ErrorCode;
import org.h2.constant.SysProperties;
import org.h2.constraint.Constraint;
import org.h2.index.Index;
import org.h2.jdbc.JdbcConnection;
......
......@@ -10,12 +10,11 @@ import java.io.IOException;
import java.net.Socket;
import java.util.ArrayList;
import org.h2.api.DatabaseEventListener;
import org.h2.api.ErrorCode;
import org.h2.api.JavaObjectSerializer;
import org.h2.command.CommandInterface;
import org.h2.command.CommandRemote;
import org.h2.command.dml.SetTypes;
import org.h2.constant.ErrorCode;
import org.h2.constant.SysProperties;
import org.h2.jdbc.JdbcSQLException;
import org.h2.message.DbException;
import org.h2.message.Trace;
......
......@@ -7,7 +7,8 @@
package org.h2.engine;
import java.util.HashMap;
import org.h2.constant.ErrorCode;
import org.h2.api.ErrorCode;
import org.h2.message.DbException;
import org.h2.util.Utils;
......
差异被折叠。
......@@ -8,7 +8,6 @@ package org.h2.engine;
import java.util.ArrayList;
import java.util.HashMap;
import org.h2.constant.SysProperties;
import org.h2.message.DbException;
import org.h2.store.Data;
import org.h2.store.FileStore;
......
......@@ -6,8 +6,7 @@
*/
package org.h2.engine;
import org.h2.constant.ErrorCode;
import org.h2.constant.SysProperties;
import org.h2.api.ErrorCode;
import org.h2.message.DbException;
import org.h2.result.Row;
import org.h2.store.Data;
......
......@@ -8,7 +8,8 @@ package org.h2.engine;
import java.util.ArrayList;
import java.util.Arrays;
import org.h2.constant.ErrorCode;
import org.h2.api.ErrorCode;
import org.h2.message.DbException;
import org.h2.message.Trace;
import org.h2.schema.Schema;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论