提交 1cccbd70 authored 作者: Andrei Tokar's avatar Andrei Tokar

fix typo in field name, put comment

上级 7c3cbb4a
...@@ -119,7 +119,7 @@ public class MVTable extends TableBase { ...@@ -119,7 +119,7 @@ public class MVTable extends TableBase {
*/ */
private final ArrayDeque<Session> waitingSessions = new ArrayDeque<>(); private final ArrayDeque<Session> waitingSessions = new ArrayDeque<>();
private final Trace traceLock; private final Trace traceLock;
private final AtomicInteger changesUnitilAnalyze; private final AtomicInteger changesUnitlAnalyze;
private int nextAnalyze; private int nextAnalyze;
private final boolean containsLargeObject; private final boolean containsLargeObject;
private Column rowIdColumn; private Column rowIdColumn;
...@@ -130,7 +130,7 @@ public class MVTable extends TableBase { ...@@ -130,7 +130,7 @@ public class MVTable extends TableBase {
public MVTable(CreateTableData data, MVTableEngine.Store store) { public MVTable(CreateTableData data, MVTableEngine.Store store) {
super(data); super(data);
nextAnalyze = database.getSettings().analyzeAuto; nextAnalyze = database.getSettings().analyzeAuto;
changesUnitilAnalyze = nextAnalyze <= 0 ? null : new AtomicInteger(nextAnalyze); changesUnitlAnalyze = nextAnalyze <= 0 ? null : new AtomicInteger(nextAnalyze);
this.store = store; this.store = store;
this.transactionStore = store.getTransactionStore(); this.transactionStore = store.getTransactionStore();
this.isHidden = data.isHidden; this.isHidden = data.isHidden;
...@@ -728,8 +728,8 @@ public class MVTable extends TableBase { ...@@ -728,8 +728,8 @@ public class MVTable extends TableBase {
Index index = indexes.get(i); Index index = indexes.get(i);
index.truncate(session); index.truncate(session);
} }
if (changesUnitilAnalyze != null) { if (changesUnitlAnalyze != null) {
changesUnitilAnalyze.set(nextAnalyze); changesUnitlAnalyze.set(nextAnalyze);
} }
} }
...@@ -759,12 +759,12 @@ public class MVTable extends TableBase { ...@@ -759,12 +759,12 @@ public class MVTable extends TableBase {
} }
private void analyzeIfRequired(Session session) { private void analyzeIfRequired(Session session) {
if (changesUnitilAnalyze != null) { if (changesUnitlAnalyze != null) {
if (changesUnitilAnalyze.decrementAndGet() == 0) { if (changesUnitlAnalyze.decrementAndGet() == 0) {
if (nextAnalyze <= Integer.MAX_VALUE / 2) { if (nextAnalyze <= Integer.MAX_VALUE / 2) {
nextAnalyze *= 2; nextAnalyze *= 2;
} }
changesUnitilAnalyze.set(nextAnalyze); changesUnitlAnalyze.set(nextAnalyze);
session.markTableForAnalyze(this); session.markTableForAnalyze(this);
} }
} }
......
...@@ -12,7 +12,9 @@ import org.h2.value.Value; ...@@ -12,7 +12,9 @@ import org.h2.value.Value;
* index. * index.
*/ */
public interface SearchRow { public interface SearchRow {
/**
* Index of a virtual "_ROWID_" column within a row or a table
*/
int ROWID_INDEX = -1; int ROWID_INDEX = -1;
/** /**
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论