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
5e126b50
Commit
5e126b50
authored
Apr 18, 2012
by
Nuno Carvalho
Browse files
Options
Browse Files
Download
Plain Diff
WL#6236: Allow SHOW MASTER LOGS and SHOW BINARY LOGS with REPLICATION CLIENT
Merge from 5.1 into 5.5.
parents
eff1ec5f
448c3d62
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
mysql-test/suite/binlog/r/binlog_grant.result
mysql-test/suite/binlog/r/binlog_grant.result
+4
-0
mysql-test/suite/binlog/t/binlog_grant.test
mysql-test/suite/binlog/t/binlog_grant.test
+19
-0
sql/sql_parse.cc
sql/sql_parse.cc
+1
-1
No files found.
mysql-test/suite/binlog/r/binlog_grant.result
View file @
5e126b50
...
...
@@ -22,3 +22,7 @@ ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) fo
**** Clean up ****
set global binlog_format = @saved_binlog_format;
drop user mysqltest_1@localhost;
GRANT REPLICATION CLIENT ON *.* TO 'mysqltest_1'@'localhost';
SHOW MASTER LOGS;
SHOW BINARY LOGS;
DROP USER 'mysqltest_1'@'localhost';
mysql-test/suite/binlog/t/binlog_grant.test
View file @
5e126b50
...
...
@@ -54,3 +54,22 @@ disconnect root;
connection
default
;
set
global
binlog_format
=
@
saved_binlog_format
;
drop
user
mysqltest_1
@
localhost
;
# Testing if REPLICATION CLIENT privilege is enough to execute
# SHOW MASTER LOGS and SHOW BINARY.
GRANT
REPLICATION
CLIENT
ON
*.*
TO
'mysqltest_1'
@
'localhost'
;
--
connect
(
rpl
,
localhost
,
mysqltest_1
,,)
--
connection
rpl
# We are only interested if the following commands succeed and not on
# their output.
--
disable_result_log
SHOW
MASTER
LOGS
;
SHOW
BINARY
LOGS
;
--
enable_result_log
# clean up
--
disconnect
rpl
connection
default
;
DROP
USER
'mysqltest_1'
@
'localhost'
;
sql/sql_parse.cc
View file @
5e126b50
...
...
@@ -2677,7 +2677,7 @@ case SQLCOM_PREPARE:
goto
error
;
#else
{
if
(
check_global_access
(
thd
,
SUPER_ACL
))
if
(
check_global_access
(
thd
,
SUPER_ACL
|
REPL_CLIENT_ACL
))
goto
error
;
res
=
show_binlogs
(
thd
);
break
;
...
...
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