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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
dcc9fd4c
Commit
dcc9fd4c
authored
Oct 18, 2013
by
Vicențiu Ciorbaru
Committed by
Sergei Golubchik
Oct 18, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented syntax recognition for REVOKE ROLE
parent
ec92a4e0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
1 deletion
+13
-1
sql/mysqld.cc
sql/mysqld.cc
+1
-0
sql/sql_lex.h
sql/sql_lex.h
+1
-1
sql/sql_parse.cc
sql/sql_parse.cc
+3
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+8
-0
No files found.
sql/mysqld.cc
View file @
dcc9fd4c
...
...
@@ -3484,6 +3484,7 @@ SHOW_VAR com_status_vars[]= {
{
"resignal"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_RESIGNAL
]),
SHOW_LONG_STATUS
},
{
"revoke"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_REVOKE
]),
SHOW_LONG_STATUS
},
{
"revoke_all"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_REVOKE_ALL
]),
SHOW_LONG_STATUS
},
{
"revoke_role"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_REVOKE_ROLE
]),
SHOW_LONG_STATUS
},
{
"rollback"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_ROLLBACK
]),
SHOW_LONG_STATUS
},
{
"rollback_to_savepoint"
,(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_ROLLBACK_TO_SAVEPOINT
]),
SHOW_LONG_STATUS
},
{
"savepoint"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_SAVEPOINT
]),
SHOW_LONG_STATUS
},
...
...
sql/sql_lex.h
View file @
dcc9fd4c
...
...
@@ -169,7 +169,7 @@ enum enum_sql_command {
SQLCOM_SHOW_WARNS
,
SQLCOM_EMPTY_QUERY
,
SQLCOM_SHOW_ERRORS
,
SQLCOM_SHOW_STORAGE_ENGINES
,
SQLCOM_SHOW_PRIVILEGES
,
SQLCOM_HELP
,
SQLCOM_CREATE_USER
,
SQLCOM_DROP_USER
,
SQLCOM_RENAME_USER
,
SQLCOM_CREATE_ROLE
,
SQLCOM_DROP_ROLE
,
SQLCOM_CREATE_ROLE
,
SQLCOM_DROP_ROLE
,
SQLCOM_REVOKE_ROLE
,
SQLCOM_REVOKE_ALL
,
SQLCOM_CHECKSUM
,
SQLCOM_CREATE_PROCEDURE
,
SQLCOM_CREATE_SPFUNCTION
,
SQLCOM_CALL
,
SQLCOM_DROP_PROCEDURE
,
SQLCOM_ALTER_PROCEDURE
,
SQLCOM_ALTER_FUNCTION
,
...
...
sql/sql_parse.cc
View file @
dcc9fd4c
...
...
@@ -370,6 +370,7 @@ void init_update_queries(void)
sql_command_flags
[
SQLCOM_GRANT
]
=
CF_CHANGES_DATA
;
sql_command_flags
[
SQLCOM_GRANT_ROLE
]
=
CF_CHANGES_DATA
;
sql_command_flags
[
SQLCOM_REVOKE
]
=
CF_CHANGES_DATA
;
sql_command_flags
[
SQLCOM_REVOKE_ROLE
]
=
CF_CHANGES_DATA
;
sql_command_flags
[
SQLCOM_OPTIMIZE
]
=
CF_CHANGES_DATA
;
sql_command_flags
[
SQLCOM_CREATE_FUNCTION
]
=
CF_CHANGES_DATA
;
sql_command_flags
[
SQLCOM_CREATE_PROCEDURE
]
=
CF_CHANGES_DATA
|
CF_AUTO_COMMIT_TRANS
;
...
...
@@ -420,6 +421,7 @@ void init_update_queries(void)
sql_command_flags
[
SQLCOM_CREATE_ROLE
]
|=
CF_AUTO_COMMIT_TRANS
;
sql_command_flags
[
SQLCOM_REVOKE_ALL
]
=
CF_AUTO_COMMIT_TRANS
;
sql_command_flags
[
SQLCOM_REVOKE
]
|=
CF_AUTO_COMMIT_TRANS
;
sql_command_flags
[
SQLCOM_REVOKE_ROLE
]
|=
CF_AUTO_COMMIT_TRANS
;
sql_command_flags
[
SQLCOM_GRANT
]
|=
CF_AUTO_COMMIT_TRANS
;
sql_command_flags
[
SQLCOM_GRANT_ROLE
]
|=
CF_AUTO_COMMIT_TRANS
;
...
...
@@ -3893,6 +3895,7 @@ end_with_restore_list:
}
break
;
}
case
SQLCOM_REVOKE_ROLE
:
case
SQLCOM_GRANT_ROLE
:
{
/* TODO Implement grant */
...
...
sql/sql_yacc.yy
View file @
dcc9fd4c
...
...
@@ -14271,6 +14271,14 @@ revoke_command:
lex->sql_command= SQLCOM_REVOKE;
lex->type= TYPE_ENUM_PROXY;
}
| grant_role FROM grant_list_with_roles
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_REVOKE_ROLE;
lex->type= 0;
printf("The rolename to be revoked is: %s\n", $1.str);
}
;
grant:
...
...
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