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
ec92a4e0
Commit
ec92a4e0
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 DROP ROLE
parent
fac8c9ef
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
1 deletion
+12
-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
+6
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+4
-0
No files found.
sql/mysqld.cc
View file @
ec92a4e0
...
@@ -3448,6 +3448,7 @@ SHOW_VAR com_status_vars[]= {
...
@@ -3448,6 +3448,7 @@ SHOW_VAR com_status_vars[]= {
{
"drop_function"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DROP_FUNCTION
]),
SHOW_LONG_STATUS
},
{
"drop_function"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DROP_FUNCTION
]),
SHOW_LONG_STATUS
},
{
"drop_index"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DROP_INDEX
]),
SHOW_LONG_STATUS
},
{
"drop_index"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DROP_INDEX
]),
SHOW_LONG_STATUS
},
{
"drop_procedure"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DROP_PROCEDURE
]),
SHOW_LONG_STATUS
},
{
"drop_procedure"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DROP_PROCEDURE
]),
SHOW_LONG_STATUS
},
{
"drop_role"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DROP_ROLE
]),
SHOW_LONG_STATUS
},
{
"drop_server"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DROP_SERVER
]),
SHOW_LONG_STATUS
},
{
"drop_server"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DROP_SERVER
]),
SHOW_LONG_STATUS
},
{
"drop_table"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DROP_TABLE
]),
SHOW_LONG_STATUS
},
{
"drop_table"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DROP_TABLE
]),
SHOW_LONG_STATUS
},
{
"drop_trigger"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DROP_TRIGGER
]),
SHOW_LONG_STATUS
},
{
"drop_trigger"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_DROP_TRIGGER
]),
SHOW_LONG_STATUS
},
...
...
sql/sql_lex.h
View file @
ec92a4e0
...
@@ -169,7 +169,7 @@ enum enum_sql_command {
...
@@ -169,7 +169,7 @@ enum enum_sql_command {
SQLCOM_SHOW_WARNS
,
SQLCOM_EMPTY_QUERY
,
SQLCOM_SHOW_ERRORS
,
SQLCOM_SHOW_WARNS
,
SQLCOM_EMPTY_QUERY
,
SQLCOM_SHOW_ERRORS
,
SQLCOM_SHOW_STORAGE_ENGINES
,
SQLCOM_SHOW_PRIVILEGES
,
SQLCOM_SHOW_STORAGE_ENGINES
,
SQLCOM_SHOW_PRIVILEGES
,
SQLCOM_HELP
,
SQLCOM_CREATE_USER
,
SQLCOM_DROP_USER
,
SQLCOM_RENAME_USER
,
SQLCOM_HELP
,
SQLCOM_CREATE_USER
,
SQLCOM_DROP_USER
,
SQLCOM_RENAME_USER
,
SQLCOM_CREATE_ROLE
,
SQLCOM_CREATE_ROLE
,
SQLCOM_DROP_ROLE
,
SQLCOM_REVOKE_ALL
,
SQLCOM_CHECKSUM
,
SQLCOM_REVOKE_ALL
,
SQLCOM_CHECKSUM
,
SQLCOM_CREATE_PROCEDURE
,
SQLCOM_CREATE_SPFUNCTION
,
SQLCOM_CALL
,
SQLCOM_CREATE_PROCEDURE
,
SQLCOM_CREATE_SPFUNCTION
,
SQLCOM_CALL
,
SQLCOM_DROP_PROCEDURE
,
SQLCOM_ALTER_PROCEDURE
,
SQLCOM_ALTER_FUNCTION
,
SQLCOM_DROP_PROCEDURE
,
SQLCOM_ALTER_PROCEDURE
,
SQLCOM_ALTER_FUNCTION
,
...
...
sql/sql_parse.cc
View file @
ec92a4e0
...
@@ -3761,6 +3761,12 @@ end_with_restore_list:
...
@@ -3761,6 +3761,12 @@ end_with_restore_list:
my_ok
(
thd
);
my_ok
(
thd
);
break
;
break
;
}
}
case
SQLCOM_DROP_ROLE
:
{
/* TODO */
my_ok
(
thd
);
break
;
}
case
SQLCOM_REVOKE_ALL
:
case
SQLCOM_REVOKE_ALL
:
{
{
if
(
check_access
(
thd
,
UPDATE_ACL
,
"mysql"
,
NULL
,
NULL
,
1
,
1
)
&&
if
(
check_access
(
thd
,
UPDATE_ACL
,
"mysql"
,
NULL
,
NULL
,
1
,
1
)
&&
...
...
sql/sql_yacc.yy
View file @
ec92a4e0
...
@@ -11001,6 +11001,10 @@ drop:
...
@@ -11001,6 +11001,10 @@ drop:
{
{
Lex->sql_command = SQLCOM_DROP_USER;
Lex->sql_command = SQLCOM_DROP_USER;
}
}
| DROP ROLE_SYM clear_privileges opt_if_exists role_list
{
Lex->sql_command = SQLCOM_DROP_ROLE;
}
| DROP VIEW_SYM opt_if_exists
| DROP VIEW_SYM opt_if_exists
{
{
LEX *lex= Lex;
LEX *lex= Lex;
...
...
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