Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
6062e87f
Commit
6062e87f
authored
Oct 17, 2013
by
Vicențiu Ciorbaru
Committed by
Sergei Golubchik
Oct 17, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Created new set_var_role class to handle the SET ROLE command
parent
7ec24435
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
0 deletions
+30
-0
sql/set_var.cc
sql/set_var.cc
+19
-0
sql/set_var.h
sql/set_var.h
+11
-0
No files found.
sql/set_var.cc
View file @
6062e87f
...
...
@@ -871,6 +871,25 @@ int set_var_password::update(THD *thd)
#endif
}
/*****************************************************************************
Functions to handle SET ROLE
*****************************************************************************/
int
set_var_role
::
check
(
THD
*
thd
)
{
/* nothing to check */
return
0
;
}
int
set_var_role
::
update
(
THD
*
thd
)
{
#ifndef NO_EMBEDDED_ACCESS_CHECKS
return
acl_setrole
(
thd
,
this
->
role
.
str
);
#else
return
0
;
#endif
}
/*****************************************************************************
Functions to handle SET NAMES and SET CHARACTER SET
*****************************************************************************/
...
...
sql/set_var.h
View file @
6062e87f
...
...
@@ -276,6 +276,17 @@ class set_var_password: public set_var_base
int
update
(
THD
*
thd
);
};
/* For SET ROLE */
class
set_var_role
:
public
set_var_base
{
LEX_STRING
role
;
public:
set_var_role
(
LEX_STRING
role_arg
)
:
role
(
role_arg
)
{};
int
check
(
THD
*
thd
);
int
update
(
THD
*
thd
);
};
/* For SET NAMES and SET CHARACTER SET */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment