Debian Codegraph @

mysql-test/suite/binlog/r/binlog_grant.result

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