提交 8960fc1f authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Preserve default BINARY_COLLATION and UUID_COLLATION in database

上级 00eb5f57
...@@ -855,6 +855,8 @@ public class Database implements DataHandler { ...@@ -855,6 +855,8 @@ public class Database implements DataHandler {
lockMeta(systemSession); lockMeta(systemSession);
addDatabaseObject(systemSession, setting); addDatabaseObject(systemSession, setting);
} }
setSortSetting(SetTypes.BINARY_COLLATION, SysProperties.SORT_BINARY_UNSIGNED);
setSortSetting(SetTypes.UUID_COLLATION, SysProperties.SORT_UUID_UNSIGNED);
// mark all ids used in the page store // mark all ids used in the page store
if (pageStore != null) { if (pageStore != null) {
BitSet f = pageStore.getObjectIds(); BitSet f = pageStore.getObjectIds();
...@@ -875,6 +877,15 @@ public class Database implements DataHandler { ...@@ -875,6 +877,15 @@ public class Database implements DataHandler {
} }
} }
private void setSortSetting(int type, boolean defValue) {
String name = SetTypes.getTypeName(type);
if (settings.get(name) == null) {
Setting setting = new Setting(this, allocateObjectId(), name);
setting.setStringValue(defValue ? CompareMode.UNSIGNED : CompareMode.SIGNED);
lockMeta(systemSession);
addDatabaseObject(systemSession, setting);
}
}
private void handleUpgradeIssues() { private void handleUpgradeIssues() {
if (store != null && !isReadOnly()) { if (store != null && !isReadOnly()) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论