diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-09-07 09:30:39 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-09-07 09:30:39 +0300 |
commit | fada4cb9dc3459d73b69866fb86e04413ba160d4 (patch) | |
tree | 986cfa1963f53edafe30709d799803d62f0c0102 /mysql-test/suite/rpl/r | |
parent | ddd8901cd2523289720fa8bd3bbd7dbc2d3f9ad5 (diff) | |
parent | 71fc31ba360e7caf384ad2c0c44e7b01f34c7b43 (diff) | |
download | mariadb-git-fada4cb9dc3459d73b69866fb86e04413ba160d4.tar.gz |
Merge 10.8 into 10.9
Diffstat (limited to 'mysql-test/suite/rpl/r')
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_filter_revoke_missing_user.result | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_filter_revoke_missing_user.result b/mysql-test/suite/rpl/r/rpl_filter_revoke_missing_user.result new file mode 100644 index 00000000000..efd73d88964 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_filter_revoke_missing_user.result @@ -0,0 +1,39 @@ +include/master-slave.inc +[connection master] +# +# Set replica to ignore system tables +connection slave; +include/stop_slave.inc +SET @@GLOBAL.replicate_wild_ignore_table="mysql.%"; +include/start_slave.inc +# +# Trying to execute REVOKE ALL PRIVILEGES on a non-existent user and +# DROP USER on a list of users where not all users exist should error +# and be written into the binary log +connection master; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'nonexistentuser'@'%'; +ERROR HY000: Can't revoke all privileges for one or more of the requested users +CREATE USER 'testuser'@'localhost' IDENTIFIED by ''; +DROP USER 'testuser'@'localhost', 'nonexistentuser'@'%'; +ERROR HY000: Operation DROP USER failed for 'nonexistentuser'@'%' +# +# Ensure the events exist in the primary's binary log +FLUSH BINARY LOGS; +# MYSQL_BINLOG MYSQLD_DATADIR/binlog_file > MYSQL_TMP_DIR/mysqlbinlog_out.sql +# There should be three Query events: REVOKE, CREATE USER, and DROP USER +FOUND 3 /Query/ in mysqlbinlog_out.sql +FOUND 1 /REVOKE ALL PRIVILEGES/ in mysqlbinlog_out.sql +FOUND 1 /CREATE USER/ in mysqlbinlog_out.sql +FOUND 1 /DROP USER/ in mysqlbinlog_out.sql +# +# Ensure that the replica receives the event without error +connection slave; +Last_SQL_Error = +Last_SQL_Errno = 0 +# +# Clean up +connection slave; +include/stop_slave.inc +SET @@GLOBAL.replicate_wild_ignore_table=""; +include/start_slave.inc +include/rpl_end.inc |