提交 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,9 +122,11 @@ 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 (db) {
db.updateMeta(sysSession, table);
sysSession.commit(true);
synchronized (sysSession) {
synchronized (db) {
db.updateMeta(sysSession, table);
sysSession.commit(true);
}
}
}
}
......
......@@ -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
synchronized (database) {
addOrUpdateSetting(database.getSystemSession(), name, value, 0);
database.getSystemSession().commit(true);
Session sysSession = database.getSystemSession();
synchronized (sysSession) {
synchronized (database) {
addOrUpdateSetting(sysSession, name, value, 0);
sysSession.commit(true);
}
}
break;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论