File: binlog_grant.result

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (71 lines) | stat: -rw-r--r-- 3,963 bytes parent folder | download
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