mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:03:02 +01:00
refactoring rules for partial alters
This commit is contained in:
parent
695082ece7
commit
b77464537a
@ -2755,9 +2755,7 @@ void CreateAlterProcedureNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsq
|
||||
else if (alter)
|
||||
{
|
||||
if (executeAlter(tdbb, dsqlScratch, transaction, false, true))
|
||||
{
|
||||
altered = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (create) // create or alter
|
||||
|
@ -215,7 +215,7 @@ string CreateAlterPackageNode::internalPrint(NodePrinter& printer) const
|
||||
|
||||
DdlNode* CreateAlterPackageNode::dsqlPass(DsqlCompilerScratch* dsqlScratch)
|
||||
{
|
||||
if(alter && !items)
|
||||
if (alter && !items)
|
||||
return DdlNode::dsqlPass(dsqlScratch);
|
||||
|
||||
MemoryPool& pool = dsqlScratch->getPool();
|
||||
@ -326,9 +326,9 @@ void CreateAlterPackageNode::execute(thread_db* tdbb, DsqlCompilerScratch* dsqlS
|
||||
|
||||
if (alter)
|
||||
{
|
||||
if(alterIndividualParameters)
|
||||
if (alterIndividualParameters)
|
||||
{
|
||||
if(!executeAlterIndividualParameters(tdbb, dsqlScratch, transaction))
|
||||
if (!executeAlterIndividualParameters(tdbb, dsqlScratch, transaction))
|
||||
status_exception::raise(
|
||||
Arg::Gds(isc_no_meta_update) <<
|
||||
Arg::Gds(isc_dyn_package_not_found) << Arg::Str(name));
|
||||
@ -504,7 +504,7 @@ bool CreateAlterPackageNode::executeAlterIndividualParameters(thread_db* tdbb, D
|
||||
MODIFY PKG
|
||||
if (ssDefiner.has_value())
|
||||
{
|
||||
if(ssDefiner.value() != SqlSecurity::SS_DROP)
|
||||
if (ssDefiner.value() != SqlSecurity::SS_DROP)
|
||||
{
|
||||
PKG.RDB$SQL_SECURITY.NULL = FALSE;
|
||||
PKG.RDB$SQL_SECURITY = ssDefiner.value() == SqlSecurity::SS_DEFINER ? FB_TRUE : FB_FALSE;
|
||||
|
@ -2707,10 +2707,6 @@ procedure_clause
|
||||
| external_procedure_clause
|
||||
;
|
||||
|
||||
%type <createAlterProcedureNode> change_opt_procedure_clause
|
||||
change_opt_procedure_clause
|
||||
;
|
||||
|
||||
%type <createAlterProcedureNode> psql_procedure_clause
|
||||
psql_procedure_clause
|
||||
: procedure_clause_start optional_sql_security_full_alter_clause AS local_declarations_opt full_proc_block
|
||||
@ -2742,8 +2738,8 @@ procedure_clause_start
|
||||
{ $$ = $2; }
|
||||
;
|
||||
|
||||
%type <createAlterProcedureNode> change_opt_procedure_clause
|
||||
change_opt_procedure_clause
|
||||
%type <createAlterProcedureNode> partial_alter_procedure_clause
|
||||
partial_alter_procedure_clause
|
||||
: symbol_procedure_name
|
||||
{ $$ = newNode<CreateAlterProcedureNode>(*$1); }
|
||||
optional_sql_security_partial_alter_clause
|
||||
@ -2761,7 +2757,7 @@ alter_procedure_clause
|
||||
$$->alter = true;
|
||||
$$->create = false;
|
||||
}
|
||||
| change_opt_procedure_clause
|
||||
| partial_alter_procedure_clause
|
||||
{
|
||||
$$ = $1;
|
||||
$$->alter = true;
|
||||
@ -2852,9 +2848,6 @@ function_clause
|
||||
: psql_function_clause
|
||||
| external_function_clause;
|
||||
|
||||
%type <createAlterFunctionNode> change_opt_function_clause
|
||||
change_opt_function_clause
|
||||
;
|
||||
|
||||
%type <createAlterFunctionNode> psql_function_clause
|
||||
psql_function_clause
|
||||
@ -2892,8 +2885,8 @@ function_clause_start
|
||||
}
|
||||
;
|
||||
|
||||
%type <createAlterFunctionNode> change_opt_function_clause
|
||||
change_opt_function_clause
|
||||
%type <createAlterFunctionNode> partial_alter_function_clause
|
||||
partial_alter_function_clause
|
||||
: symbol_UDF_name
|
||||
{ $$ = newNode<CreateAlterFunctionNode>(*$1); }
|
||||
alter_individual_ops($2)
|
||||
@ -2955,7 +2948,7 @@ alter_function_clause
|
||||
$$->alter = true;
|
||||
$$->create = false;
|
||||
}
|
||||
| change_opt_function_clause
|
||||
| partial_alter_function_clause
|
||||
{
|
||||
$$ = $1;
|
||||
$$->alter = true;
|
||||
@ -2987,8 +2980,8 @@ package_clause
|
||||
}
|
||||
;
|
||||
|
||||
%type <createAlterPackageNode> change_opt_package_clause
|
||||
change_opt_package_clause
|
||||
%type <createAlterPackageNode> partial_alter_package_clause
|
||||
partial_alter_package_clause
|
||||
: symbol_package_name optional_sql_security_partial_alter_clause
|
||||
{
|
||||
CreateAlterPackageNode* node = newNode<CreateAlterPackageNode>(*$1);
|
||||
@ -3034,7 +3027,7 @@ alter_package_clause
|
||||
$$->alter = true;
|
||||
$$->create = false;
|
||||
}
|
||||
| change_opt_package_clause
|
||||
| partial_alter_package_clause
|
||||
{
|
||||
$$ = $1;
|
||||
$$->alter = true;
|
||||
|
Loading…
Reference in New Issue
Block a user