| 1 |
--source include/have_binlog_format_row.inc |
| 2 |
--source include/master-slave.inc |
| 3 |
|
| 4 |
# |
| 5 |
# BUG #34189183 - CALL sys.diagnostics() returns "Access denied" |
| 6 |
# |
| 7 |
|
| 8 |
--connection master |
| 9 |
|
| 10 |
# Create test user |
| 11 |
CREATE USER 'test'@'localhost' IDENTIFIED BY ''; |
| 12 |
GRANT ALL ON *.* TO 'test'@'localhost'; |
| 13 |
REVOKE SUPER ON *.* FROM 'test'@'localhost'; |
| 14 |
REVOKE SYSTEM_VARIABLES_ADMIN ON *.* FROM 'test'@'localhost'; |
| 15 |
REVOKE SESSION_VARIABLES_ADMIN ON *.* FROM 'test'@'localhost'; |
| 16 |
|
| 17 |
connect (con1, localhost, test, , ); |
| 18 |
|
| 19 |
# Check for 'current' config |
| 20 |
# Must NOT return Access Denied |
| 21 |
let $complete_log= $MYSQLTEST_VARDIR/log/sys_diagnose.log; |
| 22 |
--exec $MYSQL -utest -e "CALL sys.diagnostics(180, 60, 'current');" > $complete_log 2>&1 |
| 23 |
--remove_file $complete_log |
| 24 |
|
| 25 |
# Check for 'medium' config |
| 26 |
# Must NOT return Access Denied |
| 27 |
let $complete_log= $MYSQLTEST_VARDIR/log/sys_diagnose.log; |
| 28 |
--exec $MYSQL -utest -e "CALL sys.diagnostics(60, 10, 'medium');" > $complete_log 2>&1 |
| 29 |
--remove_file $complete_log |
| 30 |
|
| 31 |
# Check for 'full' config |
| 32 |
# Must NOT return Access Denied |
| 33 |
let $complete_log= $MYSQLTEST_VARDIR/log/sys_diagnose.log; |
| 34 |
--exec $MYSQL -utest -e "CALL sys.diagnostics(60, 10, 'full');" > $complete_log 2>&1 |
| 35 |
--remove_file $complete_log |
| 36 |
|
| 37 |
# Revoke the privileges |
| 38 |
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'test'@'localhost'; |
| 39 |
|
| 40 |
# Drop the user, clean up done |
| 41 |
DROP USER test@localhost; |
| 42 |
|
| 43 |
--source include/sync_slave_sql_with_master.inc |
| 44 |
--source include/rpl_end.inc |