mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 00:43:02 +01:00
Protect system domains.
This commit is contained in:
parent
add68e374f
commit
4fac925a2e
@ -3716,7 +3716,9 @@ void CreateDomainNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch
|
||||
Attachment* const attachment = transaction->tra_attachment;
|
||||
dsql_fld* type = nameType->type;
|
||||
|
||||
if (fb_utils::implicit_domain(nameType->name.c_str()))
|
||||
// The commented line should be restored when implicit domains get their own sys flag.
|
||||
//if (fb_utils::implicit_domain(nameType->name.c_str()))
|
||||
if (strncmp(nameType->name.c_str(), IMPLICIT_DOMAIN_PREFIX, IMPLICIT_DOMAIN_PREFIX_LEN) == 0)
|
||||
{
|
||||
status_exception::raise(
|
||||
Arg::Gds(isc_sqlerr) << Arg::Num(-637) <<
|
||||
@ -4245,6 +4247,12 @@ void AlterDomainNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlScratch,
|
||||
executeDdlTrigger(tdbb, dsqlScratch, transaction, DTW_BEFORE,
|
||||
DDL_TRIGGER_ALTER_DOMAIN, name);
|
||||
|
||||
if (!FLD.RDB$SYSTEM_FLAG.NULL && FLD.RDB$SYSTEM_FLAG == fb_sysflag_system)
|
||||
{
|
||||
status_exception::raise(Arg::Gds(isc_dyn_cant_modify_sysobj) <<
|
||||
"domain" << Arg::Str(name));
|
||||
}
|
||||
|
||||
MODIFY FLD
|
||||
if (dropConstraint)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user