support max_connections and max_user_connections

This commit is contained in:
st0
2021-08-19 17:11:52 +08:00
committed by wangzelin.wzl
parent 4a1adf11e8
commit 88a8862b77
52 changed files with 22189 additions and 24112 deletions

View File

@ -101,6 +101,9 @@ int ObSetPasswordExecutor::execute(ObExecContext& ctx, ObSetPasswordStmt& stmt)
arg.x509_issuer_ = x509_issuer;
arg.x509_subject_ = x509_subject;
arg.exec_tenant_id_ = tenant_id;
arg.max_connections_per_hour_ = stmt.get_max_connections_per_hour();
arg.max_user_connections_= stmt.get_max_user_connections();
arg.modify_max_connections_ = stmt.get_modify_max_connections();
if (stmt.get_need_enc()) {
if (OB_FAIL(ObCreateUserExecutor::encrypt_passwd(passwd, arg.passwd_, enc_buf, ENC_BUF_LEN))) {
LOG_WARN("Encrypt passwd failed", K(ret));

View File

@ -166,6 +166,8 @@ int ObCreateUserExecutor::execute(ObExecContext& ctx, ObCreateUserStmt& stmt)
user_info.set_user_id(combine_id(tenant_id, OB_EMPTY_USER_ID));
}
user_info.set_profile_id(stmt.get_profile_id());
user_info.set_max_connections(stmt.get_max_connections_per_hour());
user_info.set_max_user_connections(stmt.get_max_user_connections());
if (OB_FAIL(arg.user_infos_.push_back(user_info))) {
LOG_WARN("Add user info to array error", K(ret));
} else {