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
3e1c743d
Commit
3e1c743d
authored
Oct 22, 2015
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-7656 init_file option does not allow changing passwords
allow SET PASSWORD from bootstrap and init-file
parent
e257b8b9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
1 deletion
+36
-1
mysql-test/r/init_file_set_password-7656.result
mysql-test/r/init_file_set_password-7656.result
+8
-0
mysql-test/t/init_file_set_password-7656.test
mysql-test/t/init_file_set_password-7656.test
+26
-0
sql/sql_acl.cc
sql/sql_acl.cc
+2
-1
No files found.
mysql-test/r/init_file_set_password-7656.result
0 → 100644
View file @
3e1c743d
create user foo@localhost;
select user,host,password from mysql.user where user='foo';
user host password
foo localhost
select user,host,password from mysql.user where user='foo';
user host password
foo localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
drop user foo@localhost;
mysql-test/t/init_file_set_password-7656.test
0 → 100644
View file @
3e1c743d
#
# MDEV-7656 init_file option does not allow changing passwords
#
--
source
include
/
not_embedded
.
inc
create
user
foo
@
localhost
;
select
user
,
host
,
password
from
mysql
.
user
where
user
=
'foo'
;
--
write_file
$MYSQLTEST_VARDIR
/
init
.
file
grant
all
on
*.*
to
foo
@
localhost
identified
by
'test'
;
EOF
--
enable_reconnect
--
exec
echo
"wait"
>
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
shutdown_server
10
--
source
include
/
wait_until_disconnected
.
inc
--
exec
echo
"restart:--init-file=
$MYSQLTEST_VARDIR
/init.file "
>
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
source
include
/
wait_until_connected_again
.
inc
select
user
,
host
,
password
from
mysql
.
user
where
user
=
'foo'
;
drop
user
foo
@
localhost
;
sql/sql_acl.cc
View file @
3e1c743d
...
...
@@ -2558,7 +2558,8 @@ int check_change_password(THD *thd, const char *host, const char *user,
my_error
(
ER_OPTION_PREVENTS_STATEMENT
,
MYF
(
0
),
"--skip-grant-tables"
);
return
(
1
);
}
if
(
!
thd
->
slave_thread
&&
!
thd
->
security_ctx
->
priv_user
[
0
])
if
(
!
thd
->
slave_thread
&&
!
thd
->
security_ctx
->
priv_user
[
0
]
&&
!
in_bootstrap
)
{
my_message
(
ER_PASSWORD_ANONYMOUS_USER
,
ER
(
ER_PASSWORD_ANONYMOUS_USER
),
MYF
(
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