提交 4c335580 authored 作者: Thomas Mueller's avatar Thomas Mueller

Stop supporting version 1.2 in the trunk.

上级 9b421f05
...@@ -11,7 +11,6 @@ import java.io.InputStreamReader; ...@@ -11,7 +11,6 @@ import java.io.InputStreamReader;
import java.io.Reader; import java.io.Reader;
import org.h2.command.CommandInterface; import org.h2.command.CommandInterface;
import org.h2.command.Prepared; import org.h2.command.Prepared;
import org.h2.constant.SysProperties;
import org.h2.engine.Constants; import org.h2.engine.Constants;
import org.h2.engine.Session; import org.h2.engine.Session;
import org.h2.message.DbException; import org.h2.message.DbException;
...@@ -24,7 +23,7 @@ import org.h2.util.ScriptReader; ...@@ -24,7 +23,7 @@ import org.h2.util.ScriptReader;
*/ */
public class RunScriptCommand extends ScriptBase { public class RunScriptCommand extends ScriptBase {
private String charset = Constants.VERSION_MINOR < 3 ? SysProperties.FILE_ENCODING : Constants.UTF8; private String charset = Constants.UTF8;
public RunScriptCommand(Session session) { public RunScriptCommand(Session session) {
super(session); super(session);
......
...@@ -66,7 +66,7 @@ import org.h2.value.ValueString; ...@@ -66,7 +66,7 @@ import org.h2.value.ValueString;
*/ */
public class ScriptCommand extends ScriptBase { public class ScriptCommand extends ScriptBase {
private String charset = Constants.VERSION_MINOR < 3 ? SysProperties.FILE_ENCODING : Constants.UTF8; private String charset = Constants.UTF8;
private Set<String> schemaNames; private Set<String> schemaNames;
private Collection<Table> tables; private Collection<Table> tables;
private boolean passwords; private boolean passwords;
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
*/ */
package org.h2.constant; package org.h2.constant;
import org.h2.engine.Constants;
import org.h2.message.TraceSystem; import org.h2.message.TraceSystem;
import org.h2.util.MathUtils; import org.h2.util.MathUtils;
import org.h2.util.Utils; import org.h2.util.Utils;
...@@ -187,7 +186,7 @@ public class SysProperties { ...@@ -187,7 +186,7 @@ public class SysProperties {
* System property <code>h2.lobInDatabase</code> (default: true).<br /> * System property <code>h2.lobInDatabase</code> (default: true).<br />
* Store LOB files in the database. * Store LOB files in the database.
*/ */
public static final boolean LOB_IN_DATABASE = Utils.getProperty("h2.lobInDatabase", Constants.VERSION_MINOR >= 3); public static final boolean LOB_IN_DATABASE = Utils.getProperty("h2.lobInDatabase", true);
/** /**
* System property <code>h2.lobClientMaxSizeMemory</code> (default: * System property <code>h2.lobClientMaxSizeMemory</code> (default:
......
...@@ -54,11 +54,7 @@ public class Csv implements SimpleRowSource { ...@@ -54,11 +54,7 @@ public class Csv implements SimpleRowSource {
private boolean caseSensitiveColumnNames; private boolean caseSensitiveColumnNames;
private boolean preserveWhitespace; private boolean preserveWhitespace;
private boolean writeColumnHeader = true; private boolean writeColumnHeader = true;
private char lineComment = 0;
// TODO change the docs at setLineCommentCharacter
// TODO also change help.csv
private char lineComment = Constants.VERSION_MINOR == 3 ? 0 : '#';
private String lineSeparator = SysProperties.LINE_SEPARATOR; private String lineSeparator = SysProperties.LINE_SEPARATOR;
private String nullString = ""; private String nullString = "";
...@@ -710,7 +706,7 @@ public class Csv implements SimpleRowSource { ...@@ -710,7 +706,7 @@ public class Csv implements SimpleRowSource {
/** /**
* Set the line comment character. The default is character code 0 (line * Set the line comment character. The default is character code 0 (line
* comments are disabled) for H2 version 1.3, and '#' for H2 version 1.2. * comments are disabled).
* *
* @param lineCommentCharacter the line comment character * @param lineCommentCharacter the line comment character
*/ */
......
...@@ -24,7 +24,6 @@ import java.util.ArrayList; ...@@ -24,7 +24,6 @@ import java.util.ArrayList;
import java.util.Random; import java.util.Random;
import org.h2.constant.ErrorCode; import org.h2.constant.ErrorCode;
import org.h2.constant.SysProperties; import org.h2.constant.SysProperties;
import org.h2.engine.Constants;
import org.h2.store.fs.FileUtils; import org.h2.store.fs.FileUtils;
import org.h2.test.TestBase; import org.h2.test.TestBase;
import org.h2.tools.Csv; import org.h2.tools.Csv;
...@@ -176,7 +175,7 @@ public class TestCsv extends TestBase { ...@@ -176,7 +175,7 @@ public class TestCsv extends TestBase {
assertEquals('"', csv.getFieldDelimiter()); assertEquals('"', csv.getFieldDelimiter());
assertEquals(',', csv.getFieldSeparatorRead()); assertEquals(',', csv.getFieldSeparatorRead());
assertEquals(",", csv.getFieldSeparatorWrite()); assertEquals(",", csv.getFieldSeparatorWrite());
assertEquals(Constants.VERSION_MINOR == 3 ? 0 : '#', csv.getLineCommentCharacter()); assertEquals(0, csv.getLineCommentCharacter());
assertEquals(false, csv.getPreserveWhitespace()); assertEquals(false, csv.getPreserveWhitespace());
String charset; String charset;
......
...@@ -16,7 +16,6 @@ import java.sql.Statement; ...@@ -16,7 +16,6 @@ import java.sql.Statement;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Random; import java.util.Random;
import org.h2.constant.ErrorCode; import org.h2.constant.ErrorCode;
import org.h2.engine.Constants;
import org.h2.test.TestBase; import org.h2.test.TestBase;
import org.h2.util.New; import org.h2.util.New;
...@@ -161,7 +160,7 @@ public class TestTransaction extends TestBase { ...@@ -161,7 +160,7 @@ public class TestTransaction extends TestBase {
Connection conn2 = getConnection("transaction"); Connection conn2 = getConnection("transaction");
conn2.setAutoCommit(false); conn2.setAutoCommit(false);
Statement stat2 = conn2.createStatement(); Statement stat2 = conn2.createStatement();
if (config.mvcc && Constants.VERSION_MINOR >= 3) { if (config.mvcc) {
stat2.execute("update test set name = 'Welt' where id = 2"); stat2.execute("update test set name = 'Welt' where id = 2");
} }
assertThrows(ErrorCode.LOCK_TIMEOUT_1, stat2). assertThrows(ErrorCode.LOCK_TIMEOUT_1, stat2).
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论