提交 82b9aef4 authored 作者: andrei's avatar andrei

fix for issue #1062

上级 515bee4a
......@@ -648,6 +648,17 @@ public class Session extends SessionWithState implements TransactionStore.Rollba
*/
public void commit(boolean ddl) {
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;
transactionStart = 0;
if (transaction != null) {
......@@ -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();
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论