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
20776a68
Commit
20776a68
authored
Apr 30, 2009
by
Daniel Fischer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
backport #41456, commit 61847
parent
459b6862
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
+19
-0
mysql-test/r/grant.result
mysql-test/r/grant.result
+5
-0
mysql-test/t/grant.test
mysql-test/t/grant.test
+7
-0
sql/set_var.cc
sql/set_var.cc
+7
-0
No files found.
mysql-test/r/grant.result
View file @
20776a68
...
...
@@ -1151,4 +1151,9 @@ drop user 'greg'@'localhost';
drop view v1;
drop table test;
drop function test_function;
SELECT CURRENT_USER();
CURRENT_USER()
root@localhost
SET PASSWORD FOR CURRENT_USER() = PASSWORD("admin");
SET PASSWORD FOR CURRENT_USER() = PASSWORD("");
End of 5.0 tests
mysql-test/t/grant.test
View file @
20776a68
...
...
@@ -1175,4 +1175,11 @@ drop view v1;
drop
table
test
;
drop
function
test_function
;
#
# Bug#41456 SET PASSWORD hates CURRENT_USER()
#
SELECT
CURRENT_USER
();
SET
PASSWORD
FOR
CURRENT_USER
()
=
PASSWORD
(
"admin"
);
SET
PASSWORD
FOR
CURRENT_USER
()
=
PASSWORD
(
""
);
--
echo
End
of
5.0
tests
sql/set_var.cc
View file @
20776a68
...
...
@@ -3475,6 +3475,7 @@ int set_var_password::check(THD *thd)
#ifndef NO_EMBEDDED_ACCESS_CHECKS
if
(
!
user
->
host
.
str
)
{
DBUG_ASSERT
(
thd
->
security_ctx
->
priv_host
);
if
(
*
thd
->
security_ctx
->
priv_host
!=
0
)
{
user
->
host
.
str
=
(
char
*
)
thd
->
security_ctx
->
priv_host
;
...
...
@@ -3486,6 +3487,12 @@ int set_var_password::check(THD *thd)
user
->
host
.
length
=
1
;
}
}
if
(
!
user
->
user
.
str
)
{
DBUG_ASSERT
(
thd
->
security_ctx
->
priv_user
);
user
->
user
.
str
=
(
char
*
)
thd
->
security_ctx
->
priv_user
;
user
->
user
.
length
=
strlen
(
thd
->
security_ctx
->
priv_user
);
}
/* Returns 1 as the function sends error to client */
return
check_change_password
(
thd
,
user
->
host
.
str
,
user
->
user
.
str
,
password
,
strlen
(
password
))
?
1
:
0
;
...
...
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