raise error when function is not valid
This commit is contained in:
parent
68ec445d55
commit
e5d2af7ad6
@ -1348,6 +1348,7 @@ int ObResourceManagerProxy::replace_user_mapping_rule(ObMySQLTransaction &trans,
|
||||
user_exist))) {
|
||||
LOG_WARN("fail check if user exist", K(tenant_id), K(value), K(ret));
|
||||
} else if (!user_exist) {
|
||||
ret = OB_ERR_USER_NOT_EXIST;
|
||||
LOG_USER_ERROR(OB_ERR_USER_NOT_EXIST, 0, "");
|
||||
}
|
||||
}
|
||||
@ -1416,7 +1417,8 @@ int ObResourceManagerProxy::replace_function_mapping_rule(ObMySQLTransaction &tr
|
||||
if (OB_FAIL(check_if_function_exist(value, function_exist))) {
|
||||
LOG_WARN("fail check if function exist", K(tenant_id), K(value), K(ret));
|
||||
} else if (OB_UNLIKELY(!function_exist)) {
|
||||
LOG_USER_ERROR(OB_NOT_SUPPORTED, "invalid function name, please check");
|
||||
ret = OB_INVALID_CONFIG;
|
||||
LOG_USER_ERROR(OB_INVALID_CONFIG, "invalid function name, please check");
|
||||
}
|
||||
}
|
||||
if (OB_SUCC(ret) && function_exist) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user