mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 14:03:07 +01:00
Be explicit, change "qualifier" to "package" in QualifiedName (needed anyway if/when schemas are added).
This commit is contained in:
parent
5eddc636fd
commit
446097fe8e
@ -35,21 +35,21 @@ namespace Firebird {
|
||||
class QualifiedName
|
||||
{
|
||||
public:
|
||||
QualifiedName(MemoryPool& p, const MetaName& aIdentifier, const MetaName& aQualifier)
|
||||
QualifiedName(MemoryPool& p, const MetaName& aIdentifier, const MetaName& aPackage)
|
||||
: identifier(p, aIdentifier),
|
||||
qualifier(p, aQualifier)
|
||||
package(p, aPackage)
|
||||
{
|
||||
}
|
||||
|
||||
QualifiedName(const MetaName& aIdentifier, const MetaName& aQualifier)
|
||||
QualifiedName(const MetaName& aIdentifier, const MetaName& aPackage)
|
||||
: identifier(aIdentifier),
|
||||
qualifier(aQualifier)
|
||||
package(aPackage)
|
||||
{
|
||||
}
|
||||
|
||||
explicit QualifiedName(MemoryPool& p)
|
||||
: identifier(p),
|
||||
qualifier(p)
|
||||
package(p)
|
||||
{
|
||||
}
|
||||
|
||||
@ -59,28 +59,28 @@ public:
|
||||
|
||||
QualifiedName(MemoryPool& p, const QualifiedName& src)
|
||||
: identifier(p, src.identifier),
|
||||
qualifier(p, src.qualifier)
|
||||
package(p, src.package)
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
bool operator >(const QualifiedName& m) const
|
||||
{
|
||||
return qualifier > m.qualifier || (qualifier == m.qualifier && identifier > m.identifier);
|
||||
return package > m.package || (package == m.package && identifier > m.identifier);
|
||||
}
|
||||
|
||||
bool operator ==(const QualifiedName& m) const
|
||||
{
|
||||
return identifier == m.identifier && qualifier == m.qualifier;
|
||||
return identifier == m.identifier && package == m.package;
|
||||
}
|
||||
|
||||
public:
|
||||
string toString() const
|
||||
{
|
||||
string s;
|
||||
if (qualifier.hasData())
|
||||
if (package.hasData())
|
||||
{
|
||||
s = qualifier.c_str();
|
||||
s = package.c_str();
|
||||
s.append(".");
|
||||
}
|
||||
s.append(identifier.c_str());
|
||||
@ -89,7 +89,7 @@ public:
|
||||
|
||||
public:
|
||||
MetaName identifier;
|
||||
MetaName qualifier;
|
||||
MetaName package;
|
||||
};
|
||||
|
||||
} // namespace Firebird
|
||||
|
@ -3003,8 +3003,8 @@ static void define_view(DsqlCompilerScratch* dsqlScratch, NOD_TYPE op)
|
||||
else //if (procedure)
|
||||
{
|
||||
ctxType = VCT_PROCEDURE;
|
||||
if (procedure->prc_name.qualifier.hasData())
|
||||
statement->append_string(isc_dyn_pkg_name, procedure->prc_name.qualifier);
|
||||
if (procedure->prc_name.package.hasData())
|
||||
statement->append_string(isc_dyn_pkg_name, procedure->prc_name.package);
|
||||
}
|
||||
statement->append_number(isc_dyn_view_context_type, (SSHORT) ctxType);
|
||||
|
||||
|
@ -2227,10 +2227,10 @@ static void gen_relation( DsqlCompilerScratch* dsqlScratch, dsql_ctx* context)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (procedure->prc_name.qualifier.hasData())
|
||||
if (procedure->prc_name.package.hasData())
|
||||
{
|
||||
stuff(dsqlScratch->getStatement(), context->ctx_alias ? blr_procedure4 : blr_procedure3);
|
||||
stuff_meta_string(dsqlScratch->getStatement(), procedure->prc_name.qualifier.c_str());
|
||||
stuff_meta_string(dsqlScratch->getStatement(), procedure->prc_name.package.c_str());
|
||||
stuff_meta_string(dsqlScratch->getStatement(), procedure->prc_name.identifier.c_str());
|
||||
}
|
||||
else
|
||||
@ -2995,12 +2995,12 @@ static void gen_udf( DsqlCompilerScratch* dsqlScratch, const dsql_nod* node)
|
||||
{
|
||||
const dsql_udf* userFunc = (dsql_udf*) node->nod_arg[0];
|
||||
|
||||
if (userFunc->udf_name.qualifier.isEmpty())
|
||||
if (userFunc->udf_name.package.isEmpty())
|
||||
stuff(dsqlScratch->getStatement(), blr_function);
|
||||
else
|
||||
{
|
||||
stuff(dsqlScratch->getStatement(), blr_function2);
|
||||
stuff_meta_string(dsqlScratch->getStatement(), userFunc->udf_name.qualifier.c_str());
|
||||
stuff_meta_string(dsqlScratch->getStatement(), userFunc->udf_name.package.c_str());
|
||||
}
|
||||
|
||||
stuff_meta_string(dsqlScratch->getStatement(), userFunc->udf_name.identifier.c_str());
|
||||
|
@ -177,7 +177,7 @@ void METD_drop_function(jrd_tra* transaction, const dsql_str* name, const MetaNa
|
||||
|
||||
if (dbb->dbb_functions.get(metaName, function))
|
||||
{
|
||||
MET_dsql_cache_use(tdbb, SYM_udf, metaName.identifier, metaName.qualifier);
|
||||
MET_dsql_cache_use(tdbb, SYM_udf, metaName.identifier, metaName.package);
|
||||
function->udf_flags |= UDF_dropped;
|
||||
dbb->dbb_functions.remove(metaName);
|
||||
}
|
||||
@ -211,7 +211,7 @@ void METD_drop_procedure(jrd_tra* transaction, const dsql_str* name, const MetaN
|
||||
|
||||
if (dbb->dbb_procedures.get(metaName, procedure))
|
||||
{
|
||||
MET_dsql_cache_use(tdbb, SYM_procedure, metaName.identifier, metaName.qualifier);
|
||||
MET_dsql_cache_use(tdbb, SYM_procedure, metaName.identifier, metaName.package);
|
||||
procedure->prc_flags |= PRC_dropped;
|
||||
dbb->dbb_procedures.remove(metaName);
|
||||
}
|
||||
@ -884,19 +884,19 @@ dsql_udf* METD_get_function(jrd_tra* transaction, DsqlCompilerScratch* dsqlScrat
|
||||
QualifiedName metaName(MetaName(name->str_data, name->str_length),
|
||||
(package ? MetaName(package->str_data, package->str_length) : NULL));
|
||||
|
||||
bool maybeUnqualified = dsqlScratch->package.hasData() && metaName.qualifier.isEmpty();
|
||||
bool maybeUnqualified = dsqlScratch->package.hasData() && metaName.package.isEmpty();
|
||||
if (maybeUnqualified)
|
||||
metaName.qualifier = dsqlScratch->package;
|
||||
metaName.package = dsqlScratch->package;
|
||||
|
||||
// Start by seeing if symbol is already defined
|
||||
|
||||
dsql_udf* userFunc = NULL;
|
||||
if (dbb->dbb_functions.get(metaName, userFunc))
|
||||
{
|
||||
if (userFunc->udf_private && metaName.qualifier != dsqlScratch->package)
|
||||
if (userFunc->udf_private && metaName.package != dsqlScratch->package)
|
||||
return NULL;
|
||||
|
||||
if (MET_dsql_cache_use(tdbb, SYM_udf, metaName.identifier, metaName.qualifier))
|
||||
if (MET_dsql_cache_use(tdbb, SYM_udf, metaName.identifier, metaName.package))
|
||||
userFunc->udf_flags |= UDF_dropped;
|
||||
|
||||
return userFunc;
|
||||
@ -913,7 +913,7 @@ dsql_udf* METD_get_function(jrd_tra* transaction, DsqlCompilerScratch* dsqlScrat
|
||||
FOR(REQUEST_HANDLE handle1 TRANSACTION_HANDLE transaction)
|
||||
X IN RDB$FUNCTIONS WITH
|
||||
X.RDB$FUNCTION_NAME EQ name->str_data AND
|
||||
X.RDB$PACKAGE_NAME EQUIV NULLIF(metaName.qualifier.c_str(), '')
|
||||
X.RDB$PACKAGE_NAME EQUIV NULLIF(metaName.package.c_str(), '')
|
||||
|
||||
if (!DSQL_REQUEST(irq_function))
|
||||
DSQL_REQUEST(irq_function) = handle1;
|
||||
@ -934,7 +934,7 @@ dsql_udf* METD_get_function(jrd_tra* transaction, DsqlCompilerScratch* dsqlScrat
|
||||
if (maybeUnqualified)
|
||||
{
|
||||
maybeUnqualified = false;
|
||||
metaName.qualifier = "";
|
||||
metaName.package = "";
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
@ -946,7 +946,7 @@ dsql_udf* METD_get_function(jrd_tra* transaction, DsqlCompilerScratch* dsqlScrat
|
||||
FOR(REQUEST_HANDLE handle2 TRANSACTION_HANDLE transaction)
|
||||
X IN RDB$FUNCTION_ARGUMENTS WITH
|
||||
X.RDB$FUNCTION_NAME EQ name->str_data AND
|
||||
X.RDB$PACKAGE_NAME EQUIV NULLIF(metaName.qualifier.c_str(), '')
|
||||
X.RDB$PACKAGE_NAME EQUIV NULLIF(metaName.package.c_str(), '')
|
||||
SORTED BY X.RDB$ARGUMENT_POSITION
|
||||
|
||||
if (!DSQL_REQUEST(irq_func_return))
|
||||
@ -1117,10 +1117,10 @@ dsql_udf* METD_get_function(jrd_tra* transaction, DsqlCompilerScratch* dsqlScrat
|
||||
|
||||
dbb->dbb_functions.put(userFunc->udf_name, userFunc);
|
||||
|
||||
if (userFunc->udf_private && metaName.qualifier != dsqlScratch->package)
|
||||
if (userFunc->udf_private && metaName.package != dsqlScratch->package)
|
||||
return NULL;
|
||||
|
||||
MET_dsql_cache_use(tdbb, SYM_udf, userFunc->udf_name.identifier, userFunc->udf_name.qualifier);
|
||||
MET_dsql_cache_use(tdbb, SYM_udf, userFunc->udf_name.identifier, userFunc->udf_name.package);
|
||||
|
||||
return userFunc;
|
||||
}
|
||||
@ -1231,19 +1231,19 @@ dsql_prc* METD_get_procedure(jrd_tra* transaction, DsqlCompilerScratch* dsqlScra
|
||||
//
|
||||
// I hope for a solution, involving savepoint logic.
|
||||
|
||||
bool maybeUnqualified = dsqlScratch->package.hasData() && metaName.qualifier.isEmpty();
|
||||
bool maybeUnqualified = dsqlScratch->package.hasData() && metaName.package.isEmpty();
|
||||
if (maybeUnqualified)
|
||||
metaName.qualifier = dsqlScratch->package;
|
||||
metaName.package = dsqlScratch->package;
|
||||
|
||||
// Start by seeing if symbol is already defined
|
||||
|
||||
dsql_prc* procedure = NULL;
|
||||
if (dbb->dbb_procedures.get(metaName, procedure))
|
||||
{
|
||||
if (procedure->prc_private && metaName.qualifier != dsqlScratch->package)
|
||||
if (procedure->prc_private && metaName.package != dsqlScratch->package)
|
||||
return NULL;
|
||||
|
||||
if (MET_dsql_cache_use(tdbb, SYM_procedure, metaName.identifier, metaName.qualifier))
|
||||
if (MET_dsql_cache_use(tdbb, SYM_procedure, metaName.identifier, metaName.package))
|
||||
procedure->prc_flags |= PRC_dropped;
|
||||
|
||||
return procedure;
|
||||
@ -1258,7 +1258,7 @@ dsql_prc* METD_get_procedure(jrd_tra* transaction, DsqlCompilerScratch* dsqlScra
|
||||
FOR(REQUEST_HANDLE handle1 TRANSACTION_HANDLE transaction)
|
||||
X IN RDB$PROCEDURES
|
||||
WITH X.RDB$PROCEDURE_NAME EQ name->str_data AND
|
||||
X.RDB$PACKAGE_NAME EQUIV NULLIF(metaName.qualifier.c_str(), '')
|
||||
X.RDB$PACKAGE_NAME EQUIV NULLIF(metaName.package.c_str(), '')
|
||||
|
||||
if (!DSQL_REQUEST(irq_procedure))
|
||||
DSQL_REQUEST(irq_procedure) = handle1;
|
||||
@ -1281,7 +1281,7 @@ dsql_prc* METD_get_procedure(jrd_tra* transaction, DsqlCompilerScratch* dsqlScra
|
||||
if (maybeUnqualified)
|
||||
{
|
||||
maybeUnqualified = false;
|
||||
metaName.qualifier = "";
|
||||
metaName.package = "";
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
@ -1304,7 +1304,7 @@ dsql_prc* METD_get_procedure(jrd_tra* transaction, DsqlCompilerScratch* dsqlScra
|
||||
WITH FLD.RDB$FIELD_NAME EQ PR.RDB$FIELD_SOURCE AND
|
||||
PR.RDB$PROCEDURE_NAME EQ name->str_data AND
|
||||
PR.RDB$PARAMETER_TYPE = type AND
|
||||
PR.RDB$PACKAGE_NAME EQUIV NULLIF(metaName.qualifier.c_str(), '')
|
||||
PR.RDB$PACKAGE_NAME EQUIV NULLIF(metaName.package.c_str(), '')
|
||||
SORTED BY DESCENDING PR.RDB$PARAMETER_NUMBER
|
||||
|
||||
if (!DSQL_REQUEST(irq_parameters))
|
||||
@ -1386,11 +1386,11 @@ dsql_prc* METD_get_procedure(jrd_tra* transaction, DsqlCompilerScratch* dsqlScra
|
||||
|
||||
dbb->dbb_procedures.put(procedure->prc_name, procedure);
|
||||
|
||||
if (procedure->prc_private && metaName.qualifier != dsqlScratch->package)
|
||||
if (procedure->prc_private && metaName.package != dsqlScratch->package)
|
||||
return NULL;
|
||||
|
||||
MET_dsql_cache_use(tdbb, SYM_procedure, procedure->prc_name.identifier,
|
||||
procedure->prc_name.qualifier);
|
||||
procedure->prc_name.package);
|
||||
|
||||
return procedure;
|
||||
}
|
||||
|
@ -1333,10 +1333,10 @@ dsql_nod* PASS1_statement(DsqlCompilerScratch* dsqlScratch, dsql_nod* input)
|
||||
node->nod_arg[e_exe_procedure] = input->nod_arg[e_exe_procedure];
|
||||
node->nod_arg[e_exe_package] = input->nod_arg[e_exe_package];
|
||||
|
||||
if (!node->nod_arg[e_exe_package] && procedure->prc_name.qualifier.hasData())
|
||||
if (!node->nod_arg[e_exe_package] && procedure->prc_name.package.hasData())
|
||||
{
|
||||
node->nod_arg[e_exe_package] = (dsql_nod*) MAKE_string(
|
||||
procedure->prc_name.qualifier.c_str(), procedure->prc_name.qualifier.length());
|
||||
procedure->prc_name.package.c_str(), procedure->prc_name.package.length());
|
||||
}
|
||||
|
||||
// handle input parameters
|
||||
@ -8639,7 +8639,7 @@ static dsql_nod* pass1_sys_function(DsqlCompilerScratch* dsqlScratch, dsql_nod*
|
||||
node = MAKE_node(nod_udf, 3);
|
||||
node->nod_arg[0] = (dsql_nod*) name;
|
||||
|
||||
const MetaName& package = userFunc->udf_name.qualifier;
|
||||
const MetaName& package = userFunc->udf_name.package;
|
||||
if (package.isEmpty())
|
||||
node->nod_arg[1] = NULL;
|
||||
else
|
||||
|
@ -1131,8 +1131,8 @@ void DatabaseSnapshot::putCall(const jrd_req* request, Writer& writer, int stat_
|
||||
// object name/type
|
||||
if (routine)
|
||||
{
|
||||
if (routine->getName().qualifier.hasData())
|
||||
record.storeString(f_mon_call_pkg_name, routine->getName().qualifier);
|
||||
if (routine->getName().package.hasData())
|
||||
record.storeString(f_mon_call_pkg_name, routine->getName().package);
|
||||
|
||||
record.storeString(f_mon_call_name, routine->getName().identifier);
|
||||
record.storeInteger(f_mon_call_type, routine->getObjectType());
|
||||
|
@ -397,9 +397,9 @@ void ExtEngineManager::Function::execute(thread_db* tdbb, jrd_nod* args, impure_
|
||||
{
|
||||
EngineAttachmentInfo* attInfo = extManager->getEngineAttachment(tdbb, engine);
|
||||
ContextManager<ExternalFunction> ctxManager(tdbb, attInfo, function,
|
||||
(udf->getName().qualifier.isEmpty() ?
|
||||
(udf->getName().package.isEmpty() ?
|
||||
CallerName(obj_udf, udf->getName().identifier) :
|
||||
CallerName(obj_package_header, udf->getName().qualifier)));
|
||||
CallerName(obj_package_header, udf->getName().package)));
|
||||
|
||||
impure->vlu_desc.dsc_flags = DSC_null;
|
||||
MemoryPool& pool = *tdbb->getDefaultPool();
|
||||
@ -506,9 +506,9 @@ ExtEngineManager::ResultSet::ResultSet(thread_db* tdbb, ValuesImpl* inputParams,
|
||||
{
|
||||
attInfo = procedure->extManager->getEngineAttachment(tdbb, procedure->engine);
|
||||
ContextManager<ExternalProcedure> ctxManager(tdbb, attInfo, procedure->procedure,
|
||||
(procedure->prc->getName().qualifier.isEmpty() ?
|
||||
(procedure->prc->getName().package.isEmpty() ?
|
||||
CallerName(obj_procedure, procedure->prc->getName().identifier) :
|
||||
CallerName(obj_package_header, procedure->prc->getName().qualifier)));
|
||||
CallerName(obj_package_header, procedure->prc->getName().package)));
|
||||
Attachment* attachment = tdbb->getAttachment();
|
||||
|
||||
charSet = attachment->att_charset;
|
||||
@ -539,9 +539,9 @@ bool ExtEngineManager::ResultSet::fetch(thread_db* tdbb)
|
||||
return wasFirstFetch;
|
||||
|
||||
ContextManager<ExternalProcedure> ctxManager(tdbb, attInfo, charSet,
|
||||
(procedure->prc->getName().qualifier.isEmpty() ?
|
||||
(procedure->prc->getName().package.isEmpty() ?
|
||||
CallerName(obj_procedure, procedure->prc->getName().identifier) :
|
||||
CallerName(obj_package_header, procedure->prc->getName().qualifier)));
|
||||
CallerName(obj_package_header, procedure->prc->getName().package)));
|
||||
|
||||
Database::Checkout dcoHolder(tdbb->getDatabase());
|
||||
return resultSet->fetch(RaiseError());
|
||||
@ -759,9 +759,9 @@ ExtEngineManager::Function* ExtEngineManager::makeFunction(thread_db* tdbb, cons
|
||||
|
||||
EngineAttachmentInfo* attInfo = getEngineAttachment(tdbb, engine);
|
||||
ContextManager<ExternalFunction> ctxManager(tdbb, attInfo, attInfo->adminCharSet,
|
||||
(udf->getName().qualifier.isEmpty() ?
|
||||
(udf->getName().package.isEmpty() ?
|
||||
CallerName(obj_udf, udf->getName().identifier) :
|
||||
CallerName(obj_package_header, udf->getName().qualifier)));
|
||||
CallerName(obj_package_header, udf->getName().package)));
|
||||
|
||||
ExternalFunction* externalFunction;
|
||||
|
||||
@ -769,7 +769,7 @@ ExtEngineManager::Function* ExtEngineManager::makeFunction(thread_db* tdbb, cons
|
||||
Database::Checkout dcoHolder(tdbb->getDatabase());
|
||||
|
||||
externalFunction = attInfo->engine->makeFunction(RaiseError(),
|
||||
attInfo->context, udf->getName().qualifier.nullStr(), udf->getName().identifier.c_str(),
|
||||
attInfo->context, udf->getName().package.nullStr(), udf->getName().identifier.c_str(),
|
||||
entryPointTrimmed.nullStr(), body.nullStr());
|
||||
|
||||
if (!externalFunction)
|
||||
@ -802,9 +802,9 @@ ExtEngineManager::Procedure* ExtEngineManager::makeProcedure(thread_db* tdbb, co
|
||||
|
||||
EngineAttachmentInfo* attInfo = getEngineAttachment(tdbb, engine);
|
||||
ContextManager<ExternalProcedure> ctxManager(tdbb, attInfo, attInfo->adminCharSet,
|
||||
(prc->getName().qualifier.isEmpty() ?
|
||||
(prc->getName().package.isEmpty() ?
|
||||
CallerName(obj_procedure, prc->getName().identifier) :
|
||||
CallerName(obj_package_header, prc->getName().qualifier)));
|
||||
CallerName(obj_package_header, prc->getName().package)));
|
||||
|
||||
ExternalProcedure* externalProcedure;
|
||||
|
||||
@ -812,7 +812,7 @@ ExtEngineManager::Procedure* ExtEngineManager::makeProcedure(thread_db* tdbb, co
|
||||
Database::Checkout dcoHolder(tdbb->getDatabase());
|
||||
|
||||
externalProcedure = attInfo->engine->makeProcedure(RaiseError(),
|
||||
attInfo->context, prc->getName().qualifier.nullStr(), prc->getName().identifier.c_str(),
|
||||
attInfo->context, prc->getName().package.nullStr(), prc->getName().identifier.c_str(),
|
||||
entryPointTrimmed.nullStr(), body.nullStr());
|
||||
|
||||
if (!externalProcedure)
|
||||
|
@ -152,7 +152,7 @@ Function* Function::lookup(thread_db* tdbb, const QualifiedName& name, bool nosc
|
||||
FOR(REQUEST_HANDLE request)
|
||||
X IN RDB$FUNCTIONS
|
||||
WITH X.RDB$FUNCTION_NAME EQ name.identifier.c_str() AND
|
||||
X.RDB$PACKAGE_NAME EQUIV NULLIF(name.qualifier.c_str(), '')
|
||||
X.RDB$PACKAGE_NAME EQUIV NULLIF(name.package.c_str(), '')
|
||||
|
||||
if (!REQUEST(irq_l_fun_name))
|
||||
REQUEST(irq_l_fun_name) = request;
|
||||
@ -281,7 +281,7 @@ Function* Function::loadMetadata(thread_db* tdbb, USHORT id, bool noscan, USHORT
|
||||
FOR(REQUEST_HANDLE request_arg)
|
||||
Y IN RDB$FUNCTION_ARGUMENTS
|
||||
WITH Y.RDB$FUNCTION_NAME EQ function->getName().identifier.c_str() AND
|
||||
Y.RDB$PACKAGE_NAME EQUIV NULLIF(function->getName().qualifier.c_str(), '')
|
||||
Y.RDB$PACKAGE_NAME EQUIV NULLIF(function->getName().package.c_str(), '')
|
||||
SORTED BY Y.RDB$ARGUMENT_POSITION
|
||||
|
||||
if (!REQUEST(irq_l_args))
|
||||
@ -656,7 +656,7 @@ dsc* Function::execute(thread_db* tdbb, jrd_nod* args, impure_value* value) cons
|
||||
{
|
||||
status_exception::raise(
|
||||
Arg::Gds(isc_func_pack_not_implemented) <<
|
||||
Arg::Str(getName().identifier) << Arg::Str(getName().qualifier));
|
||||
Arg::Str(getName().identifier) << Arg::Str(getName().package));
|
||||
}
|
||||
|
||||
const fun_repeat* const return_ptr = &fun_args[fun_return_arg];
|
||||
|
@ -584,7 +584,7 @@ void CMP_verify_access(thread_db* tdbb, jrd_req* request)
|
||||
{
|
||||
const SecurityClass* sec_class = SCL_get_class(tdbb, access->acc_security_name.c_str());
|
||||
|
||||
if (routine->getName().qualifier.isEmpty())
|
||||
if (routine->getName().package.isEmpty())
|
||||
{
|
||||
SCL_check_access(tdbb, sec_class, access->acc_view_id, aclType,
|
||||
routine->getName().identifier, access->acc_mask, access->acc_type,
|
||||
@ -593,7 +593,7 @@ void CMP_verify_access(thread_db* tdbb, jrd_req* request)
|
||||
else
|
||||
{
|
||||
SCL_check_access(tdbb, sec_class, access->acc_view_id,
|
||||
id_package, routine->getName().qualifier,
|
||||
id_package, routine->getName().package,
|
||||
access->acc_mask, access->acc_type,
|
||||
access->acc_name, access->acc_r_name);
|
||||
}
|
||||
@ -693,7 +693,7 @@ jrd_req* CMP_clone_request(thread_db* tdbb, jrd_req* request, USHORT level, bool
|
||||
const TEXT* secName = routine->getSecurityName().nullStr();
|
||||
const SecurityClass* secClass = SCL_get_class(tdbb, secName);
|
||||
|
||||
if (routine->getName().qualifier.isEmpty())
|
||||
if (routine->getName().package.isEmpty())
|
||||
{
|
||||
SCL_check_access(tdbb, secClass, 0, 0, NULL, SCL_execute, routine->getSclType(),
|
||||
routine->getName().identifier);
|
||||
@ -701,7 +701,7 @@ jrd_req* CMP_clone_request(thread_db* tdbb, jrd_req* request, USHORT level, bool
|
||||
else
|
||||
{
|
||||
SCL_check_access(tdbb, secClass, 0, 0, NULL, SCL_execute, object_package,
|
||||
routine->getName().qualifier);
|
||||
routine->getName().package);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4278,7 +4278,7 @@ jrd_nod* CMP_pass1(thread_db* tdbb, CompilerScratch* csb, jrd_nod* node)
|
||||
{
|
||||
const TEXT* sec_name = function->getSecurityName().nullStr();
|
||||
|
||||
if (function->getName().qualifier.isEmpty())
|
||||
if (function->getName().package.isEmpty())
|
||||
{
|
||||
CMP_post_access(tdbb, csb, sec_name, 0, SCL_execute, object_function,
|
||||
function->getName().identifier.c_str());
|
||||
@ -4286,7 +4286,7 @@ jrd_nod* CMP_pass1(thread_db* tdbb, CompilerScratch* csb, jrd_nod* node)
|
||||
else
|
||||
{
|
||||
CMP_post_access(tdbb, csb, sec_name, 0, SCL_execute, object_package,
|
||||
function->getName().qualifier.c_str());
|
||||
function->getName().package.c_str());
|
||||
}
|
||||
|
||||
ExternalAccess temp(ExternalAccess::exa_function, function->getId());
|
||||
@ -6528,7 +6528,7 @@ static void post_procedure_access(thread_db* tdbb, CompilerScratch* csb, jrd_prc
|
||||
const TEXT* prc_sec_name = procedure->getSecurityName().nullStr();
|
||||
|
||||
// this request must have EXECUTE permission on the stored procedure
|
||||
if (procedure->getName().qualifier.isEmpty())
|
||||
if (procedure->getName().package.isEmpty())
|
||||
{
|
||||
CMP_post_access(tdbb, csb, prc_sec_name, 0, SCL_execute, object_procedure,
|
||||
procedure->getName().identifier.c_str());
|
||||
@ -6536,7 +6536,7 @@ static void post_procedure_access(thread_db* tdbb, CompilerScratch* csb, jrd_prc
|
||||
else
|
||||
{
|
||||
CMP_post_access(tdbb, csb, prc_sec_name, 0, SCL_execute, object_package,
|
||||
procedure->getName().qualifier.c_str());
|
||||
procedure->getName().package.c_str());
|
||||
}
|
||||
|
||||
// Add the procedure to list of external objects accessed
|
||||
|
@ -983,7 +983,7 @@ void EXE_start(thread_db* tdbb, jrd_req* request, jrd_tra* transaction)
|
||||
{
|
||||
status_exception::raise(
|
||||
Arg::Gds(isc_proc_pack_not_implemented) <<
|
||||
Arg::Str(proc->getName().identifier) << Arg::Str(proc->getName().qualifier));
|
||||
Arg::Str(proc->getName().identifier) << Arg::Str(proc->getName().package));
|
||||
}
|
||||
|
||||
/* Post resources to transaction block. In particular, the interest locks
|
||||
|
@ -360,7 +360,7 @@ void InternalStatement::doPrepare(thread_db* tdbb, const string& sql)
|
||||
else if (request && (routine = request->getRoutine()) &&
|
||||
routine->getName().identifier.hasData())
|
||||
{
|
||||
if (routine->getName().qualifier.isEmpty())
|
||||
if (routine->getName().package.isEmpty())
|
||||
{
|
||||
tran->tra_caller_name = CallerName(routine->getObjectType(),
|
||||
routine->getName().identifier);
|
||||
@ -368,7 +368,7 @@ void InternalStatement::doPrepare(thread_db* tdbb, const string& sql)
|
||||
else
|
||||
{
|
||||
tran->tra_caller_name = CallerName(obj_package_header,
|
||||
routine->getName().qualifier);
|
||||
routine->getName().package);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2491,7 +2491,7 @@ jrd_prc* MET_lookup_procedure(thread_db* tdbb, const QualifiedName& name, bool n
|
||||
FOR(REQUEST_HANDLE request)
|
||||
P IN RDB$PROCEDURES
|
||||
WITH P.RDB$PROCEDURE_NAME EQ name.identifier.c_str() AND
|
||||
P.RDB$PACKAGE_NAME EQUIV NULLIF(name.qualifier.c_str(), '')
|
||||
P.RDB$PACKAGE_NAME EQUIV NULLIF(name.package.c_str(), '')
|
||||
|
||||
if (!REQUEST(irq_l_procedure))
|
||||
REQUEST(irq_l_procedure) = request;
|
||||
@ -4201,9 +4201,9 @@ static DSqlCacheItem* get_dsql_cache_item(thread_db* tdbb, int type, const Quali
|
||||
key.append((char*) &len, sizeof(len));
|
||||
key.append(name.identifier.c_str());
|
||||
|
||||
len = name.qualifier.length();
|
||||
len = name.package.length();
|
||||
key.append((char*) &len, sizeof(len));
|
||||
key.append(name.qualifier.c_str());
|
||||
key.append(name.package.c_str());
|
||||
|
||||
DSqlCacheItem* item = attachment->att_dsql_cache.put(key);
|
||||
if (item)
|
||||
@ -5313,7 +5313,7 @@ static void store_dependencies(thread_db* tdbb,
|
||||
case obj_procedure:
|
||||
procedure = (jrd_prc*) node->nod_arg[e_dep_object];
|
||||
dpdo_name = &procedure->getName().identifier;
|
||||
packageName = procedure->getName().qualifier;
|
||||
packageName = procedure->getName().package;
|
||||
break;
|
||||
case obj_collation:
|
||||
{
|
||||
@ -5344,7 +5344,7 @@ static void store_dependencies(thread_db* tdbb,
|
||||
{
|
||||
Function* const udf = (Function*) node->nod_arg[e_dep_object];
|
||||
dpdo_name = &udf->getName().identifier;
|
||||
packageName = udf->getName().qualifier;
|
||||
packageName = udf->getName().package;
|
||||
}
|
||||
break;
|
||||
case obj_index:
|
||||
|
@ -1097,7 +1097,7 @@ static jrd_nod* par_exec_proc(thread_db* tdbb, CompilerScratch* csb, SSHORT blr_
|
||||
else
|
||||
{
|
||||
if (blr_operator == blr_exec_proc2)
|
||||
PAR_name(csb, name.qualifier);
|
||||
PAR_name(csb, name.package);
|
||||
PAR_name(csb, name.identifier);
|
||||
procedure = MET_lookup_procedure(tdbb, name, false);
|
||||
}
|
||||
@ -1378,7 +1378,7 @@ static jrd_nod* par_function(thread_db* tdbb, CompilerScratch* csb, SSHORT blr_o
|
||||
USHORT count = 0;
|
||||
|
||||
if (blr_operator == blr_function2)
|
||||
count = PAR_name(csb, name.qualifier);
|
||||
count = PAR_name(csb, name.package);
|
||||
|
||||
count += PAR_name(csb, name.identifier);
|
||||
|
||||
@ -2074,7 +2074,7 @@ static jrd_nod* par_procedure(thread_db* tdbb, CompilerScratch* csb, SSHORT blr_
|
||||
{
|
||||
if (blr_operator == blr_procedure3 || blr_operator == blr_procedure4)
|
||||
{
|
||||
PAR_name(csb, name.qualifier);
|
||||
PAR_name(csb, name.package);
|
||||
}
|
||||
|
||||
PAR_name(csb, name.identifier);
|
||||
|
Loading…
Reference in New Issue
Block a user