提交 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 { ...@@ -122,6 +122,7 @@ public class Analyze extends DefineCommand {
// (which is the case if we are within a trigger) // (which is the case if we are within a trigger)
// then we can't update the statistics because // then we can't update the statistics because
// that would unlock all locked objects // that would unlock all locked objects
synchronized (sysSession) {
synchronized (db) { synchronized (db) {
db.updateMeta(sysSession, table); db.updateMeta(sysSession, table);
sysSession.commit(true); sysSession.commit(true);
...@@ -129,6 +130,7 @@ public class Analyze extends DefineCommand { ...@@ -129,6 +130,7 @@ public class Analyze extends DefineCommand {
} }
} }
} }
}
public void setTop(int top) { public void setTop(int top) {
this.sampleRows = top; this.sampleRows = top;
......
...@@ -107,9 +107,12 @@ public class Set extends Prepared { ...@@ -107,9 +107,12 @@ public class Set extends Prepared {
database.setCluster(value); database.setCluster(value);
// use the system session so that the current transaction // use the system session so that the current transaction
// (if any) is not committed // (if any) is not committed
Session sysSession = database.getSystemSession();
synchronized (sysSession) {
synchronized (database) { synchronized (database) {
addOrUpdateSetting(database.getSystemSession(), name, value, 0); addOrUpdateSetting(sysSession, name, value, 0);
database.getSystemSession().commit(true); sysSession.commit(true);
}
} }
break; break;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论