提交 c53f718f authored 作者: Noel Grandin's avatar Noel Grandin 提交者: GitHub

Merge pull request #607 from andreitokar/issue_580

Issue 580: NPE on store reopen
...@@ -162,7 +162,7 @@ public class MVTableEngine implements TableEngine { ...@@ -162,7 +162,7 @@ public class MVTableEngine implements TableEngine {
} }
this.transactionStore = new TransactionStore( this.transactionStore = new TransactionStore(
store, store,
new ValueDataType(null, db, null)); new ValueDataType(db.getCompareMode(), db, null));
transactionStore.init(); transactionStore.init();
} catch (IllegalStateException e) { } catch (IllegalStateException e) {
throw convertIllegalStateException(e); throw convertIllegalStateException(e);
......
...@@ -101,7 +101,7 @@ public class ValueDataType implements DataType { ...@@ -101,7 +101,7 @@ public class ValueDataType implements DataType {
int bl = bx.length; int bl = bx.length;
int len = Math.min(al, bl); int len = Math.min(al, bl);
for (int i = 0; i < len; i++) { for (int i = 0; i < len; i++) {
int sortType = sortTypes[i]; int sortType = sortTypes == null ? SortOrder.ASCENDING : sortTypes[i];
int comp = compareValues(ax[i], bx[i], sortType); int comp = compareValues(ax[i], bx[i], sortType);
if (comp != 0) { if (comp != 0) {
return comp; return comp;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论