1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
reset master;
set @saved_binlog_format = @@global.binlog_format;
Warnings:
Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
create user mysqltest_1@localhost;
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
**** Variable SQL_LOG_BIN ****
[root]
set session sql_log_bin = 1;
[plain]
set session sql_log_bin = 1;
ERROR 42000: Access denied; you need (at least one of) the SUPER, SYSTEM_VARIABLES_ADMIN or SESSION_VARIABLES_ADMIN privilege(s) for this operation
**** Variable BINLOG_FORMAT ****
[root]
set global binlog_format = 'row';
Warnings:
Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
set session binlog_format = 'row';
Warnings:
Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
[plain]
set global binlog_format = 'row';
ERROR 42000: Access denied; you need (at least one of) the SUPER or SYSTEM_VARIABLES_ADMIN privilege(s) for this operation
set session binlog_format = 'row';
ERROR 42000: Access denied; you need (at least one of) the SUPER, SYSTEM_VARIABLES_ADMIN or SESSION_VARIABLES_ADMIN privilege(s) for this operation
**** Clean up ****
set global binlog_format = @saved_binlog_format;
Warnings:
Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
drop user mysqltest_1@localhost;
CREATE USER 'mysqltest_1'@'localhost';
GRANT REPLICATION CLIENT ON *.* TO 'mysqltest_1'@'localhost';
SHOW MASTER LOGS;
SHOW BINARY LOGS;
DROP USER 'mysqltest_1'@'localhost';
#
# Bug #31869146: 'GRANT SELECT, GRANT OPTION ON *.* ' WOULD NOT WRITE
# THE PRIVILEGES TO BINLOG
#
CREATE USER b31869146@localhost;
CREATE DATABASE b31869146_db;
CREATE TABLE b31869146_db.t1 (a INT);
GRANT SELECT,GRANT OPTION ON *.* TO b31869146@localhost AS 'root'@'localhost' WITH ROLE NONE;
GRANT SELECT,GRANT OPTION ON b31869146_db.* TO b31869146@localhost;
GRANT SELECT,GRANT OPTION ON b31869146_db.t1 TO b31869146@localhost;
GRANT SELECT (a),GRANT OPTION ON b31869146_db.t1 TO b31869146@localhost;
GRANT SELECT ON *.* TO b31869146@localhost WITH GRANT OPTION AS 'root'@'localhost' WITH ROLE NONE;
GRANT SELECT ON b31869146_db.* TO b31869146@localhost WITH GRANT OPTION;
GRANT SELECT ON b31869146_db.t1 TO b31869146@localhost WITH GRANT OPTION;
GRANT SELECT (a) ON b31869146_db.t1 TO b31869146@localhost WITH GRANT OPTION;
# Success must contain SELECT for all of the GRANTS
# Show binlog events
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
binlog.000001 # Query # # use `test`; CREATE USER 'b31869146'@'localhost' IDENTIFIED WITH 'caching_sha2_password'
binlog.000001 # Query # # CREATE DATABASE b31869146_db
binlog.000001 # Query # # use `test`; CREATE TABLE b31869146_db.t1 (a INT)
binlog.000001 # Query # # use `test`; GRANT SELECT, GRANT OPTION ON *.* TO 'b31869146'@'localhost' WITH GRANT OPTION AS 'root'@'localhost' WITH ROLE NONE
binlog.000001 # Query # # use `test`; GRANT SELECT, GRANT OPTION ON `b31869146_db`.* TO 'b31869146'@'localhost' WITH GRANT OPTION
binlog.000001 # Query # # use `test`; GRANT SELECT, GRANT OPTION ON `b31869146_db`.`t1` TO 'b31869146'@'localhost' WITH GRANT OPTION
binlog.000001 # Query # # use `test`; GRANT SELECT (`a`), GRANT OPTION ON `b31869146_db`.`t1` TO 'b31869146'@'localhost' WITH GRANT OPTION
binlog.000001 # Query # # use `test`; GRANT SELECT ON *.* TO 'b31869146'@'localhost' WITH GRANT OPTION AS 'root'@'localhost' WITH ROLE NONE
binlog.000001 # Query # # use `test`; GRANT SELECT ON `b31869146_db`.* TO 'b31869146'@'localhost' WITH GRANT OPTION
binlog.000001 # Query # # use `test`; GRANT SELECT ON `b31869146_db`.`t1` TO 'b31869146'@'localhost' WITH GRANT OPTION
binlog.000001 # Query # # use `test`; GRANT SELECT (`a`) ON `b31869146_db`.`t1` TO 'b31869146'@'localhost' WITH GRANT OPTION
# cleanup
DROP USER b31869146@localhost;
DROP DATABASE b31869146_db;
# End of 8.0 tests
|