[FEAT MERGE]sql compat feature
Co-authored-by: Zach41 <zach_41@163.com>
This commit is contained in:
@ -487,7 +487,7 @@ int get_proc_db_name(
|
||||
|
||||
int get_seq_db_name(
|
||||
uint64_t tenant_id,
|
||||
ObSchemaGetterGuard &schema_guard,
|
||||
const ObSqlCtx &ctx,
|
||||
uint64_t obj_id,
|
||||
ObString &db_name)
|
||||
{
|
||||
@ -495,10 +495,15 @@ int get_seq_db_name(
|
||||
uint64_t db_id = OB_INVALID_ID;
|
||||
const ObSequenceSchema *seq_schema = NULL;
|
||||
const ObDatabaseSchema *db_schema = NULL;
|
||||
OZ (schema_guard.get_sequence_schema(tenant_id, obj_id, seq_schema));
|
||||
CK (seq_schema != NULL);
|
||||
CK(ctx.schema_guard_);
|
||||
CK(ctx.session_info_);
|
||||
OZ(ctx.session_info_->get_dblink_sequence_schema(obj_id, seq_schema));
|
||||
if (OB_SUCC(ret) && NULL == seq_schema) {
|
||||
OZ (ctx.schema_guard_->get_sequence_schema(tenant_id, obj_id, seq_schema));
|
||||
CK (seq_schema != NULL);
|
||||
}
|
||||
OX (db_id = seq_schema->get_database_id());
|
||||
OZ (schema_guard.get_database_schema(tenant_id,
|
||||
OZ (ctx.schema_guard_->get_database_schema(tenant_id,
|
||||
db_id,
|
||||
db_schema));
|
||||
CK (db_schema != NULL);
|
||||
@ -629,7 +634,7 @@ int add_seqs_priv_in_dml_inner(
|
||||
need_priv.obj_type_ = static_cast<uint64_t>(ObObjectType::SEQUENCE);
|
||||
need_priv.check_flag_ = check_flag;
|
||||
OZ (get_seq_db_name(ctx.session_info_->get_login_tenant_id(),
|
||||
*ctx.schema_guard_,
|
||||
ctx,
|
||||
obj_id, db_name));
|
||||
OX (need_priv.db_name_ = db_name);
|
||||
OZ (set_need_priv_owner_id(ctx, need_priv));
|
||||
|
||||
Reference in New Issue
Block a user