patch 4.0
This commit is contained in:
@ -13,20 +13,25 @@
|
||||
#include "sql/resolver/dcl/ob_lock_user_stmt.h"
|
||||
using namespace oceanbase::common;
|
||||
using namespace oceanbase::sql;
|
||||
ObLockUserStmt::ObLockUserStmt(common::ObIAllocator* name_pool)
|
||||
: ObDDLStmt(name_pool, stmt::T_LOCK_USER), tenant_id_(OB_INVALID_ID), locked_(false)
|
||||
{}
|
||||
ObLockUserStmt::ObLockUserStmt(common::ObIAllocator *name_pool)
|
||||
: ObDDLStmt(name_pool, stmt::T_LOCK_USER), tenant_id_(OB_INVALID_ID) , locked_(false)
|
||||
{
|
||||
}
|
||||
|
||||
ObLockUserStmt::ObLockUserStmt() : ObDDLStmt(NULL, stmt::T_LOCK_USER), tenant_id_(OB_INVALID_ID), locked_(false)
|
||||
{}
|
||||
ObLockUserStmt::ObLockUserStmt()
|
||||
: ObDDLStmt(NULL, stmt::T_LOCK_USER), tenant_id_(OB_INVALID_ID) , locked_(false)
|
||||
{
|
||||
}
|
||||
|
||||
ObLockUserStmt::~ObLockUserStmt()
|
||||
{}
|
||||
{
|
||||
}
|
||||
|
||||
int ObLockUserStmt::add_user(const ObString& user_name, const common::ObString& host_name)
|
||||
int ObLockUserStmt::add_user(const ObString &user_name, const common::ObString &host_name)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
if (0 == user_name.compare(OB_SYS_USER_NAME) && 0 == host_name.compare(OB_SYS_HOST_NAME)) {
|
||||
if (0 == user_name.compare(OB_SYS_USER_NAME)
|
||||
&& 0 == host_name.compare(OB_SYS_HOST_NAME)) {
|
||||
ret = OB_ERR_NO_PRIVILEGE;
|
||||
SQL_RESV_LOG(WARN, "Can not lock root user", K(ret));
|
||||
} else if (OB_FAIL(user_.add_string(user_name))) {
|
||||
@ -34,7 +39,8 @@ int ObLockUserStmt::add_user(const ObString& user_name, const common::ObString&
|
||||
} else if (OB_FAIL(user_.add_string(host_name))) {
|
||||
SQL_RESV_LOG(WARN, "Add host failed", K(user_name), K(host_name), K(ret));
|
||||
} else {
|
||||
// do nothing
|
||||
//do nothing
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user