提交 196a690c authored 作者: Thomas Mueller's avatar Thomas Mueller

The table INFORMATION_SCHEMA.SETTINGS now contains all H2-specific system…

The table INFORMATION_SCHEMA.SETTINGS now contains all H2-specific system properties that are explicitly set.
上级 2cae689d
...@@ -14,7 +14,9 @@ import java.sql.ResultSet; ...@@ -14,7 +14,9 @@ import java.sql.ResultSet;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.text.Collator; import java.text.Collator;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.Locale; import java.util.Locale;
import java.util.Properties;
import org.h2.command.Command; import org.h2.command.Command;
import org.h2.constant.SysProperties; import org.h2.constant.SysProperties;
import org.h2.constraint.Constraint; import org.h2.constraint.Constraint;
...@@ -860,32 +862,19 @@ public class MetaTable extends Table { ...@@ -860,32 +862,19 @@ public class MetaTable extends Table {
add(rows, "MVCC", database.isMultiVersion() ? "TRUE" : "FALSE"); add(rows, "MVCC", database.isMultiVersion() ? "TRUE" : "FALSE");
add(rows, "QUERY_TIMEOUT", "" + session.getQueryTimeout()); add(rows, "QUERY_TIMEOUT", "" + session.getQueryTimeout());
add(rows, "LOG", "" + database.getLogMode()); add(rows, "LOG", "" + database.getLogMode());
// the setting for the current database // H2-specific system properties
add(rows, "h2.allowBigDecimalExtensions", "" + SysProperties.ALLOW_BIG_DECIMAL_EXTENSIONS); ArrayList<String> settingNames = New.arrayList();
add(rows, "h2.baseDir", "" + SysProperties.getBaseDir()); Properties p = System.getProperties();
add(rows, "h2.check", "" + SysProperties.CHECK); for (Object o : p.keySet()) {
add(rows, "h2.check2", "" + SysProperties.CHECK2); String s = o == null ? "" : o.toString();
add(rows, "h2.clientTraceDirectory", SysProperties.CLIENT_TRACE_DIRECTORY); if (s.startsWith("h2.")) {
add(rows, SysProperties.H2_COLLATOR_CACHE_SIZE, "" + SysProperties.getCollatorCacheSize()); settingNames.add(s);
add(rows, "h2.defaultMaxMemoryUndo", "" + SysProperties.DEFAULT_MAX_MEMORY_UNDO); }
add(rows, "h2.lobFilesPerDirectory", "" + SysProperties.LOB_FILES_PER_DIRECTORY); }
add(rows, "h2.logAllErrors", "" + SysProperties.LOG_ALL_ERRORS); Collections.sort(settingNames);
add(rows, "h2.logAllErrorsFile", "" + SysProperties.LOG_ALL_ERRORS_FILE); for (String s : settingNames) {
add(rows, "h2.maxFileRetry", "" + SysProperties.MAX_FILE_RETRY); add(rows, s, p.getProperty(s));
add(rows, SysProperties.H2_MAX_QUERY_TIMEOUT, "" + SysProperties.getMaxQueryTimeout()); }
add(rows, "h2.lobCloseBetweenReads", "" + SysProperties.lobCloseBetweenReads);
add(rows, "h2.objectCache", "" + SysProperties.OBJECT_CACHE);
add(rows, "h2.objectCacheSize", "" + SysProperties.OBJECT_CACHE_SIZE);
add(rows, "h2.objectCacheMaxPerElementSize", "" + SysProperties.OBJECT_CACHE_MAX_PER_ELEMENT_SIZE);
add(rows, "h2.optimizeInList", "" + SysProperties.OPTIMIZE_IN_LIST);
add(rows, "h2.optimizeSubqueryCache", "" + SysProperties.OPTIMIZE_SUBQUERY_CACHE);
add(rows, "h2.recompileAlways", "" + SysProperties.RECOMPILE_ALWAYS);
add(rows, "h2.redoBufferSize", "" + SysProperties.REDO_BUFFER_SIZE);
add(rows, "h2.runFinalize", "" + SysProperties.runFinalize);
add(rows, "h2.scriptDirectory", SysProperties.getScriptDirectory());
add(rows, "h2.serverCachedObjects", "" + SysProperties.SERVER_CACHED_OBJECTS);
add(rows, "h2.serverResultSetFetchSize", "" + SysProperties.SERVER_RESULT_SET_FETCH_SIZE);
add(rows, "h2.sortNullsHigh", "" + SysProperties.SORT_NULLS_HIGH);
if (database.isPersistent()) { if (database.isPersistent()) {
PageStore store = database.getPageStore(); PageStore store = database.getPageStore();
add(rows, "info.FILE_WRITE_TOTAL", "" + store.getWriteCountTotal()); add(rows, "info.FILE_WRITE_TOTAL", "" + store.getWriteCountTotal());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论