Unverified 提交 a47b209e authored 作者: Andrei Tokar's avatar Andrei Tokar 提交者: GitHub

Merge pull request #1064 from h2database/fix#1062

fix for issue #1062
...@@ -648,6 +648,17 @@ public class Session extends SessionWithState implements TransactionStore.Rollba ...@@ -648,6 +648,17 @@ public class Session extends SessionWithState implements TransactionStore.Rollba
*/ */
public void commit(boolean ddl) { public void commit(boolean ddl) {
checkCommitRollback(); checkCommitRollback();
int rowCount = getDatabase().getSettings().analyzeSample / 10;
if (tablesToAnalyze != null) {
for (Table table : tablesToAnalyze) {
Analyze.analyzeTable(this, table, rowCount, false);
}
// analyze can lock the meta
database.unlockMeta(this);
}
tablesToAnalyze = null;
currentTransactionName = null; currentTransactionName = null;
transactionStart = 0; transactionStart = 0;
if (transaction != null) { if (transaction != null) {
...@@ -700,16 +711,6 @@ public class Session extends SessionWithState implements TransactionStore.Rollba ...@@ -700,16 +711,6 @@ public class Session extends SessionWithState implements TransactionStore.Rollba
} }
} }
int rows = getDatabase().getSettings().analyzeSample / 10;
if (tablesToAnalyze != null) {
for (Table table : tablesToAnalyze) {
Analyze.analyzeTable(this, table, rows, false);
}
// analyze can lock the meta
database.unlockMeta(this);
}
tablesToAnalyze = null;
endTransaction(); endTransaction();
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论