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
71689875
Commit
71689875
authored
Jul 28, 2017
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
parents
4fc1f2fb
8c0129dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
1 deletion
+46
-1
mysql-test/r/sp-security.result
mysql-test/r/sp-security.result
+18
-0
mysql-test/t/sp-security.test
mysql-test/t/sp-security.test
+27
-0
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
No files found.
mysql-test/r/sp-security.result
View file @
71689875
...
...
@@ -755,3 +755,21 @@ GRANT EXECUTE ON PROCEDURE `test`.`sp1` TO 'root'@'localhost'
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
drop procedure sp1;
set password='';
#
# MDEV-13396 Unexpected "alter routine comand defined" during CREATE OR REPLACE PROCEDURE
#
CREATE DATABASE u1;
CREATE PROCEDURE u1.p1() BEGIN SELECT 1; END; $$
CREATE FUNCTION u1.f1() RETURNS INT BEGIN RETURN 1; END; $$
CREATE USER u1@localhost;
GRANT CREATE ROUTINE ON u1.* TO u1@localhost;
GRANT ALTER ROUTINE ON FUNCTION u1.f1 TO u1@localhost;
GRANT ALTER ROUTINE ON PROCEDURE u1.p1 TO u1@localhost;
connect u1, localhost, u1,,;
USE u1;
CREATE OR REPLACE FUNCTION f1() RETURNS INT BEGIN RETURN 2; END; $$
CREATE OR REPLACE PROCEDURE p1() BEGIN SELECT 1; END; $$
disconnect u1;
connection default;
DROP DATABASE u1;
DROP USER u1@localhost;
mysql-test/t/sp-security.test
View file @
71689875
...
...
@@ -1023,3 +1023,30 @@ grant execute on procedure sp1 to current_user() identified by 'barfoo';
show
grants
;
drop
procedure
sp1
;
set
password
=
''
;
--
echo
#
--
echo
# MDEV-13396 Unexpected "alter routine comand defined" during CREATE OR REPLACE PROCEDURE
--
echo
#
CREATE
DATABASE
u1
;
DELIMITER
$$
;
CREATE
PROCEDURE
u1
.
p1
()
BEGIN
SELECT
1
;
END
;
$$
CREATE
FUNCTION
u1
.
f1
()
RETURNS
INT
BEGIN
RETURN
1
;
END
;
$$
DELIMITER
;
$$
CREATE
USER
u1
@
localhost
;
GRANT
CREATE
ROUTINE
ON
u1
.*
TO
u1
@
localhost
;
GRANT
ALTER
ROUTINE
ON
FUNCTION
u1
.
f1
TO
u1
@
localhost
;
GRANT
ALTER
ROUTINE
ON
PROCEDURE
u1
.
p1
TO
u1
@
localhost
;
connect
(
u1
,
localhost
,
u1
,,);
USE
u1
;
DELIMITER
$$
;
CREATE
OR
REPLACE
FUNCTION
f1
()
RETURNS
INT
BEGIN
RETURN
2
;
END
;
$$
CREATE
OR
REPLACE
PROCEDURE
p1
()
BEGIN
SELECT
1
;
END
;
$$
DELIMITER
;
$$
disconnect
u1
;
connection
default
;
DROP
DATABASE
u1
;
DROP
USER
u1
@
localhost
;
sql/sql_parse.cc
View file @
71689875
...
...
@@ -2937,7 +2937,7 @@ static int mysql_create_routine(THD *thd, LEX *lex)
{
if
(
check_routine_access
(
thd
,
ALTER_PROC_ACL
,
lex
->
sphead
->
m_db
.
str
,
lex
->
sphead
->
m_name
.
str
,
lex
->
sql_command
==
SQLCOM_
DROP
_PROCEDURE
,
0
))
lex
->
sql_command
==
SQLCOM_
CREATE
_PROCEDURE
,
0
))
return
true
;
}
...
...
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