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
23cc1be2
Commit
23cc1be2
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
283e9cf4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
0 deletions
+29
-0
mysql-test/r/sp.result
mysql-test/r/sp.result
+10
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+14
-0
sql/sql_acl.cc
sql/sql_acl.cc
+5
-0
No files found.
mysql-test/r/sp.result
View file @
23cc1be2
...
...
@@ -8032,3 +8032,13 @@ return 1;
end |
ERROR 0A000: Not allowed to return a result set from a function
drop table t1,t2;
#
# 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;
#End of 10.1 tests
mysql-test/t/sp.test
View file @
23cc1be2
...
...
@@ -9504,3 +9504,17 @@ end |
--
delimiter
;
drop
table
t1
,
t2
;
--
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
;
--
echo
#End of 10.1 tests
sql/sql_acl.cc
View file @
23cc1be2
...
...
@@ -1067,7 +1067,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