提交 2d67551e authored 作者: Thomas Mueller's avatar Thomas Mueller

In the multi-threaded mode, updating the column selectivity ("analyze") in the…

In the multi-threaded mode, updating the column selectivity ("analyze") in the background sometimes did not work.
上级 a55550da
......@@ -122,6 +122,7 @@ public class Analyze extends DefineCommand {
// (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) {
synchronized (db) {
db.updateMeta(sysSession, table);
sysSession.commit(true);
......@@ -129,6 +130,7 @@ public class Analyze extends DefineCommand {
}
}
}
}
public void setTop(int top) {
this.sampleRows = top;
......
......@@ -107,9 +107,12 @@ public class Set extends Prepared {
database.setCluster(value);
// use the system session so that the current transaction
// (if any) is not committed
Session sysSession = database.getSystemSession();
synchronized (sysSession) {
synchronized (database) {
addOrUpdateSetting(database.getSystemSession(), name, value, 0);
database.getSystemSession().commit(true);
addOrUpdateSetting(sysSession, name, value, 0);
sysSession.commit(true);
}
}
break;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论