1
# Test grants for various objects (especially variables) related to
4
source include/have_log_bin.inc;
11
set @saved_binlog_format = @@global.binlog_format;
12
create user mysqltest_1@localhost;
13
show grants for mysqltest_1@localhost;
15
connect (plain,localhost,mysqltest_1,,test);
16
connect (root,localhost,root,,test);
18
# Testing setting both session and global SQL_LOG_BIN variable both as
19
# root and as plain user.
21
--echo **** Variable SQL_LOG_BIN ****
25
set session sql_log_bin = 1;
29
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
30
set session sql_log_bin = 1;
33
# Testing setting both session and global BINLOG_FORMAT variable both
34
# as root and as plain user.
36
--echo **** Variable BINLOG_FORMAT ****
40
set global binlog_format = row;
41
set session binlog_format = row;
45
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
46
set global binlog_format = row;
47
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
48
set session binlog_format = row;
50
--echo **** Clean up ****
55
set global binlog_format = @saved_binlog_format;
56
drop user mysqltest_1@localhost;
59
# Testing if REPLICATION CLIENT privilege is enough to execute
60
# SHOW MASTER LOGS and SHOW BINARY.
61
GRANT REPLICATION CLIENT ON *.* TO 'mysqltest_1'@'localhost';
62
--connect(rpl,localhost,mysqltest_1,,)
65
# We are only interested if the following commands succeed and not on
75
DROP USER 'mysqltest_1'@'localhost';