[fix](set) fix error message when set a session only variable (#27554)

This commit is contained in:
Yulei-Yang
2023-11-24 21:48:16 +08:00
committed by GitHub
parent f3204ec18c
commit eb250bca5c

View File

@ -258,7 +258,7 @@ public class VariableMgr {
throw new DdlException(ErrorCode.ERR_VARIABLE_IS_READONLY.formatErrorMsg(setVar.getVariable()));
}
if (setVar.getType() == SetType.GLOBAL && (flag & SESSION_ONLY) != 0) {
throw new DdlException(ErrorCode.ERR_GLOBAL_VARIABLE.formatErrorMsg(setVar.getVariable()));
throw new DdlException(ErrorCode.ERR_LOCAL_VARIABLE.formatErrorMsg(setVar.getVariable()));
}
if (setVar.getType() != SetType.GLOBAL && (flag & GLOBAL) != 0) {
throw new DdlException(ErrorCode.ERR_GLOBAL_VARIABLE.formatErrorMsg(setVar.getVariable()));