提交 f5a0407b authored 作者: Noel Grandin's avatar Noel Grandin

analyze doesn't need to use the system session

since  we moved the auto-analyze calls to only happen at commit time
上级 dac00f9d
......@@ -133,23 +133,7 @@ public class Analyze extends DefineCommand {
columns[j].setSelectivity(selectivity);
}
}
if (manual) {
db.updateMeta(session, table);
} else {
Session sysSession = db.getSystemSession();
if (sysSession != session) {
// if the current session is the system session
// (which is the case if we are within a trigger)
// then we can't update the statistics because
// that would unlock all locked objects
synchronized (sysSession) {
// can't take the db lock yet, updateMeta needs to call
// lockMeta, and then it will take the db lock
db.updateMeta(sysSession, table);
sysSession.commit(true);
}
}
}
db.updateMeta(session, table);
}
public void setTop(int top) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论