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
100f721c
Commit
100f721c
authored
Dec 21, 2016
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-11584: GRANT inside an SP does not work well on 2nd execution
Allocate password hash in statment memory
parent
143d512a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
mysql-test/r/sp.result
mysql-test/r/sp.result
+9
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+11
-0
sql/sql_acl.cc
sql/sql_acl.cc
+5
-0
No files found.
mysql-test/r/sp.result
View file @
100f721c
...
...
@@ -8040,3 +8040,12 @@ v_name v_total
c 1
DROP PROCEDURE p1;
DROP TABLE t1;
#
# MDEV-11584: GRANT inside an SP does not work well on 2nd execution
#
CREATE PROCEDURE sp1()
GRANT ALL PRIVILEGES ON *.* TO 'foo'@'%' IDENTIFIED BY 'pass';
CALL sp1();
CALL sp1();
drop user 'foo'@'%';
drop procedure sp1;
mysql-test/t/sp.test
View file @
100f721c
...
...
@@ -9484,3 +9484,14 @@ CALL p1();
DROP
PROCEDURE
p1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# MDEV-11584: GRANT inside an SP does not work well on 2nd execution
--
echo
#
CREATE
PROCEDURE
sp1
()
GRANT
ALL
PRIVILEGES
ON
*.*
TO
'foo'
@
'%'
IDENTIFIED
BY
'pass'
;
CALL
sp1
();
CALL
sp1
();
drop
user
'foo'
@
'%'
;
drop
procedure
sp1
;
sql/sql_acl.cc
View file @
100f721c
...
...
@@ -1064,7 +1064,12 @@ static bool fix_lex_user(THD *thd, LEX_USER *user)
make_scramble
=
my_make_scrambled_password
;
}
Query_arena
*
arena
,
backup
;
arena
=
thd
->
activate_stmt_arena_if_needed
(
&
backup
);
char
*
buff
=
(
char
*
)
thd
->
alloc
(
scramble_length
+
1
);
if
(
arena
)
thd
->
restore_active_arena
(
arena
,
&
backup
);
if
(
buff
==
NULL
)
return
true
;
make_scramble
(
buff
,
user
->
pwtext
.
str
,
user
->
pwtext
.
length
);
...
...
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