8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 04:03:03 +01:00

Backported CORE-6479: COMMENT ON USER can only apply comment on user defined by the default usermanager plugin

This commit is contained in:
AlexPeshkoff 2021-03-11 20:23:17 +03:00
parent bcc7e129db
commit 8dfaf3af69

View File

@ -4850,13 +4850,27 @@ comment
{ $$ = newNode<CommentOnNode>($3, *$4, *$5, *$7); }
| COMMENT ON ddl_type4 ddl_qualified_name IS ddl_desc
{ $$ = newNode<CommentOnNode>($3, *$4, "", *$6); }
| COMMENT ON USER symbol_user_name IS ddl_desc
| comment_on_user
{ $$ = $1; }
;
%type <createAlterUserNode> comment_on_user
comment_on_user
: COMMENT ON USER symbol_user_name
{
CreateAlterUserNode* node =
newNode<CreateAlterUserNode>(CreateAlterUserNode::USER_MOD, *$4);
node->comment = $6;
$$ = node;
$$ = newNode<CreateAlterUserNode>(CreateAlterUserNode::USER_MOD, *$4);
}
opt_use_plugin($5) IS ddl_desc
{
CreateAlterUserNode* node = $$ = $5;
node->comment = $8;
}
;
%type opt_use_plugin(<createAlterUserNode>)
opt_use_plugin($node)
: // nothing
| use_plugin($node)
;
%type <intVal> ddl_type0
@ -6280,7 +6294,12 @@ user_fixed_option($node)
| REVOKE ADMIN ROLE { setClause($node->adminRole, "ADMIN ROLE", Nullable<bool>(false)); }
| ACTIVE { setClause($node->active, "ACTIVE/INACTIVE", Nullable<bool>(true)); }
| INACTIVE { setClause($node->active, "ACTIVE/INACTIVE", Nullable<bool>(false)); }
| USING PLUGIN valid_symbol_name
| use_plugin($node)
;
%type use_plugin(<createAlterUserNode>)
use_plugin($node)
: USING PLUGIN valid_symbol_name
{ setClause($node->plugin, "USING PLUGIN", $3); }
;