提交 1d38ee4f authored 作者: Thomas Mueller's avatar Thomas Mueller

Cluster: NEXTVAL('sequence') was only called on one cluster node, therefore…

Cluster: NEXTVAL('sequence') was only called on one cluster node, therefore sequence values could get out of sync.
上级 c572cd1b
......@@ -1934,15 +1934,26 @@ public class Function extends Expression implements FunctionCall {
}
public boolean isEverything(ExpressionVisitor visitor) {
if (visitor.getType() == ExpressionVisitor.DETERMINISTIC && !info.deterministic) {
return false;
}
for (Expression e : args) {
if (e != null && !e.isEverything(visitor)) {
return false;
}
}
return true;
switch (visitor.getType()) {
case ExpressionVisitor.DETERMINISTIC:
case ExpressionVisitor.QUERY_COMPARABLE:
case ExpressionVisitor.READONLY:
return info.deterministic;
case ExpressionVisitor.EVALUATABLE:
case ExpressionVisitor.GET_DEPENDENCIES:
case ExpressionVisitor.INDEPENDENT:
case ExpressionVisitor.NOT_FROM_RESOLVER:
case ExpressionVisitor.OPTIMIZABLE_MIN_MAX_COUNT_ALL:
case ExpressionVisitor.SET_MAX_DATA_MODIFICATION_ID:
return true;
default:
throw DbException.throwInternalError("type=" + visitor.getType());
}
}
public int getCost() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论