[fix](session-variable) repeat_max_num should be forwarded (#15840)

repeat_max_num should be forwarded to master, or stmt like:
insert into tbl values(repeat("a", 1000)) will not be affected by this session variable.
This commit is contained in:
Mingyu Chen
2023-01-12 10:51:35 +08:00
committed by GitHub
parent 640e451b53
commit ea0ef0d880
2 changed files with 2 additions and 2 deletions

View File

@ -647,7 +647,7 @@ public class SessionVariable implements Serializable, Writable {
@VariableMgr.VarAttr(name = ENABLE_SHARE_HASH_TABLE_FOR_BROADCAST_JOIN)
public boolean enableShareHashTableForBroadcastJoin = true;
@VariableMgr.VarAttr(name = REPEAT_MAX_NUM)
@VariableMgr.VarAttr(name = REPEAT_MAX_NUM, needForward = true)
public int repeatMaxNum = 10000;
@VariableMgr.VarAttr(name = GROUP_CONCAT_MAX_LEN)

View File

@ -418,7 +418,7 @@ public class VariableMgr {
}
}
private static String getValue(SessionVariable var, String name, SetType setType) throws AnalysisException {
private static String getValue(SessionVariable var, String name, SetType setType) throws AnalysisException {
VarContext ctx = ctxByVarName.get(name);
if (ctx == null) {
ErrorReport.reportAnalysisException(ErrorCode.ERR_UNKNOWN_SYSTEM_VARIABLE, name);